projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06c896b
)
Re: [perl #22000] AutoReply: [PATCH] Naughty sv_gets/RsRECORD bug
author
Adrian M. Enache
<enache@rdslink.ro>
Sat, 19 Apr 2003 20:12:18 +0000
(23:12 +0300)
committer
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Sun, 20 Apr 2003 19:53:53 +0000
(19:53 +0000)
Message-ID: <
20030419171218
.GA974@ratsnest.hole>
p4raw-id: //depot/perl@19281
sv.c
patch
|
blob
|
history
diff --git
a/sv.c
b/sv.c
index
5280c08
..
4563809
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-6379,6
+6379,8
@@
Perl_sv_gets(pTHX_ register SV *sv, register PerlIO *fp, I32 append)
#else
bytesread = PerlIO_read(fp, buffer, recsize);
#endif
+ if (bytesread < 0)
+ bytesread = 0;
SvCUR_set(sv, bytesread += append);
buffer[bytesread] = '\0';
goto return_string_or_null;