summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-02-12 17:56:42 +0000
committerSteve Hay <steve.m.hay@googlemail.com>2020-02-12 17:56:51 +0000
commit55288d9e44495dc34ab940bdafd10ff0373b359d (patch)
tree873632eba003a8a186a2980826c3d634e02acd72
parent92be2d31d166021594bb7499b2dfc644589b6333 (diff)
downloadperl-55288d9e44495dc34ab940bdafd10ff0373b359d.tar.gz
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. (cherry picked from commit 9f16475a53933d1d9c547f871b97b3b12160cece)
-rw-r--r--t/re/pat.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/re/pat.t b/t/re/pat.t
index 169684b84b..4ece584840 100644
--- a/t/re/pat.t
+++ b/t/re/pat.t
@@ -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;
@@ -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