This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: GH #17370, read beyond buffer in grok_inf_nan
authorKarl Williamson <khw@cpan.org>
Tue, 17 Dec 2019 21:23:07 +0000 (14:23 -0700)
committerKarl Williamson <khw@cpan.org>
Tue, 17 Dec 2019 21:31:08 +0000 (14:31 -0700)
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.

t/re/pat.t

index 413fbee..41d27bb 100644 (file)
@@ -24,7 +24,7 @@ BEGIN {
 
 skip_all_without_unicode_tables();
 
-plan tests => 1012;  # Update this when adding/deleting tests.
+plan tests => 1013;  # Update this when adding/deleting tests.
 
 run_tests() unless caller;
 
@@ -2084,6 +2084,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");
+    }
 
   SKIP:
     {   # [perl #133921], segfault