diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-12-02 20:03:09 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-12-02 20:03:09 +0000 |
commit | 6a0ce95c473e6c24c804466ab05b41e8ef730937 (patch) | |
tree | 22728f747357897a4820faefcfa27a3d3e8c6487 /toke.c | |
parent | c88449004825f6c7b2a3d6ce98c07515d2919b29 (diff) | |
download | perl-6a0ce95c473e6c24c804466ab05b41e8ef730937.tar.gz |
Fix bug #18573 : in a double-quoted string, a \c not followed
by any character may corrupt memory due to reading past the
end of the input buffer. Add a new error message corresponding
to this case.
p4raw-id: //depot/perl@18233
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1611,7 +1611,7 @@ S_scan_const(pTHX_ char *start) /* \c is a control character */ case 'c': s++; - { + if (s < send) { U8 c = *s++; #ifdef EBCDIC if (isLOWER(c)) @@ -1619,6 +1619,9 @@ S_scan_const(pTHX_ char *start) #endif *d++ = NATIVE_TO_NEED(has_utf8,toCTRL(c)); } + else { + yyerror("Missing control char name in \\c"); + } continue; /* printf-style backslashes, formfeeds, newlines, etc */ |