From 9f16475a53933d1d9c547f871b97b3b12160cece Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 17 Dec 2019 14:23:07 -0700 Subject: [PATCH] PATCH: GH #17370, read beyond buffer in grok_inf_nan 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/re/pat.t b/t/re/pat.t index 413fbee8238a..41d27bb3f7f9 100644 --- a/t/re/pat.t +++ b/t/re/pat.t @@ -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