This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In Perl_lex_start(), don't read the byte before SvPVX().
authorNicholas Clark <nick@ccl4.org>
Sun, 13 Nov 2011 18:07:09 +0000 (19:07 +0100)
committerNicholas Clark <nick@ccl4.org>
Sun, 13 Nov 2011 18:07:09 +0000 (19:07 +0100)
commit37555a72adecf94648131869556fee88f171a85e
tree2de33b25d719918413437673efbf3cbbfb64cbb0
parenta35dcc95dd24524931ea1c7900ae466ce7c2c255
In Perl_lex_start(), don't read the byte before SvPVX().

If len is 0, we shouldn't be reading from len - 1, as it's one before the
start of the buffer, and hence an out of bounds read.

Fixes a bug inadvertently added by commit 0abcdfa4c5da571f, restoring the
previous behaviour for the len == 0 case.
toke.c