Skip to content

Commit

Permalink
PATCH: GH #17370, read beyond buffer in grok_inf_nan
Browse files Browse the repository at this point in the history
Like GH #17367, this was caused by a failure to check that we aren't at
the end of the buffer after advancing the ptr to it.

(cherry picked from commit 9f16475)
  • Loading branch information
khwilliamson authored and steve-m-hay committed Feb 12, 2020
1 parent 92be2d3 commit 55288d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion t/re/pat.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BEGIN {
skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader;
skip_all_without_unicode_tables();

plan tests => 866; # Update this when adding/deleting tests.
plan tests => 867; # Update this when adding/deleting tests.

run_tests() unless caller;

Expand Down Expand Up @@ -2009,6 +2009,9 @@ CODE
{ # [perl #133871], ASAN/valgrind out-of-bounds access
fresh_perl_like('qr/\p{nv:NAnq}/', qr/Can't find Unicode property definition/, {}, "GH #17367");
}
{ # GH #17370, ASAN/valgrind out-of-bounds access
fresh_perl_like('qr/\p{nv:qnan}/', qr/Can't find Unicode property definition/, {}, "GH #17370");
}

{ # [perl #133921], segfault
fresh_perl_is('qr0||ß+p00000F00000ù\Q00000ÿ00000x00000x0c0e0\Qx0\Qx0\x{0c!}\;\;î0\xÿÿÿþù\Q`\Qx`{0c!}e;ù\ò`\Qm`\x{0c!}\;\;îçÿ ç!F/;îçÿù\Qxÿÿÿÿù`x{0c!}e;ù\Q`\Qx`\x{c!}\;\;îç!}\;îçÿù\Q‡ \xÿÿÿÿ>=\Qx`\Qx`ù\ò`\Qx`\x{0c!};\;îçÿ Fn0t0c €d;t ù ç€!00000000000000000000000m/0000000000000000000000000000000m/\x{){} )|i', "", {}, "[perl #133921]");
Expand Down

0 comments on commit 55288d9

Please sign in to comment.