summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-09-15 22:53:27 +0000
committerNicholas Clark <nick@ccl4.org>2008-09-15 22:53:27 +0000
commit82f1394b024fd21f3ac9c659afa5262af361e44b (patch)
treeea5d26ba2de517b3f386abcf547da6afa2a994fe /sv.c
parent343ed43ca417e8f1b1c2b68ff914b37f7f5c7b76 (diff)
downloadperl-82f1394b024fd21f3ac9c659afa5262af361e44b.tar.gz
SEGV in readline with $/ set to a reference, discovered by theorbtwo.
The bug turns out to have been introduced in 2003, with change 18580. p4raw-id: //depot/perl@34371
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 6089a00c30..e39a2c9d26 100644
--- a/sv.c
+++ b/sv.c
@@ -6704,7 +6704,7 @@ Perl_sv_gets(pTHX_ register SV *const sv, register PerlIO *const fp, I32 append)
#endif
if (bytesread < 0)
bytesread = 0;
- SvCUR_set(sv, bytesread += append);
+ SvCUR_set(sv, bytesread + append);
buffer[bytesread] = '\0';
goto return_string_or_null;
}