In perl.git, the branch smoke-me/nicholas/perlmain-ASAN has been created
<http://perl5.git.perl.org/perl.git/commitdiff/599d0abfbbab0c041727e15da375035acc6a4331?hp=0000000000000000000000000000000000000000>
at 599d0abfbbab0c041727e15da375035acc6a4331 (commit)
- Log -----------------------------------------------------------------
commit 599d0abfbbab0c041727e15da375035acc6a4331
Author: Nicholas Clark <[email protected]>
Date: Mon Mar 25 11:56:40 2013 +0100
In In S_scan_heredoc(), avoid memNE() reading beyond the end of s.
If the heredoc terminator we are searching for is longer than the bytes
remaining in s, then the memNE() would read beyond initialised memory.
Hence change the loop bounds to avoid this case, and change the failure case
below to reflect the revised end-of-loop condition.
It doesn't matter that the loop no longer increments shared->herelines,
because the failure case calls S_missingterm(), which croaks.
M toke.c
commit 07cde5325b9651be15654908f2ff2c5aab7bc9f0
Author: Nicholas Clark <[email protected]>
Date: Mon Mar 25 10:53:33 2013 +0100
In S_scan_heredoc(), the explicit test for '\n' duplicates the strNE().
PL_tokenbuf always starts with '\n', so a separate test of *s against '\n'
is duplicate work. Hence remove it, to make the code simpler and clearer.
M toke.c
-----------------------------------------------------------------------
--
Perl5 Master Repository