In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/59143e29a717d67a61b869a6c5bb49574f1ef43f?hp=6f2279ab0e52a72f0ed38de6c9a2dc80a57cdec1>
- Log ----------------------------------------------------------------- commit 59143e29a717d67a61b869a6c5bb49574f1ef43f Author: Tony Cook <[email protected]> Date: Tue Jan 17 11:52:53 2017 +1100 (perl #129342) test for buffer overflow M t/lib/croak/toke commit 3dd4eaeb8ac39e08179145b86aedda36584a3509 Author: Hugo van der Sanden <[email protected]> Date: Wed Oct 5 14:53:27 2016 +0100 [perl #129342] ensure range-start is set after error in tr/// A parse error due to invalid octal or hex escape in the range of a transliteration must still ensure some kind of start and end values are captured, since we don't stop on the first such error. Failure to do so can cause invalid reads after "Here we have parsed a range". M toke.c ----------------------------------------------------------------------- Summary of changes: t/lib/croak/toke | 7 +++++++ toke.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/t/lib/croak/toke b/t/lib/croak/toke index d35eab69f6..f1817b3a7e 100644 --- a/t/lib/croak/toke +++ b/t/lib/croak/toke @@ -350,3 +350,10 @@ EXPECT syntax error at - line 4, near "ϡ time" (Might be a runaway multi-line ϡϡ string starting on line 3) Execution of - aborted due to compilation errors. +######## +# NAME tr/// handling of mis-formatted \o characters +# may only fail with ASAN +tr/\o-0//; +EXPECT +Missing braces on \o{} at - line 2, within string +Execution of - aborted due to compilation errors. diff --git a/toke.c b/toke.c index f40936b0e2..c60d32dfd8 100644 --- a/toke.c +++ b/toke.c @@ -3391,7 +3391,7 @@ S_scan_const(pTHX_ char *start) UTF); if (! valid) { yyerror(error); - continue; + uv = 0; /* drop through to ensure range ends are set */ } goto NUM_ESCAPE_INSERT; } @@ -3409,7 +3409,7 @@ S_scan_const(pTHX_ char *start) UTF); if (! valid) { yyerror(error); - continue; + uv = 0; /* drop through to ensure range ends are set */ } } -- Perl5 Master Repository
