diff options
author | Adrian M. Enache <enache@rdslink.ro> | 2003-04-19 23:12:18 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-04-20 19:53:53 +0000 |
commit | 27e6ca2de6da17a5bf31160fd2bf3a6f71c67bd6 (patch) | |
tree | 847cbec8d121a6936a201f78dec09063ca892e7c | |
parent | 06c896bb0249a54c986239dbc45815c21fdb1da1 (diff) | |
download | perl-27e6ca2de6da17a5bf31160fd2bf3a6f71c67bd6.tar.gz |
Re: [perl #22000] AutoReply: [PATCH] Naughty sv_gets/RsRECORD bug
Message-ID: <20030419171218.GA974@ratsnest.hole>
p4raw-id: //depot/perl@19281
-rw-r--r-- | sv.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |