diff options
author | Karl Williamson <khw@cpan.org> | 2018-05-04 21:26:31 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-05-09 15:37:46 -0600 |
commit | 77dddf94110be150e8cd1a4e9d469e418a788b8d (patch) | |
tree | b7fb9c7163b7ac2ce059358c9706a87440b88eed | |
parent | d6f040aa42ca83e5e2ddbd3502921c8fee6197c4 (diff) | |
download | perl-77dddf94110be150e8cd1a4e9d469e418a788b8d.tar.gz |
PATCH: [perl #133175] script run free from wrong pool panic
Setting the pointer to NULL after freeing signals the code in later
interations that it has been freed already
No test is added because it could become outdated (not testing what it
was designed to test) with a new Unicode version changing the underlying
data. This bug was discovered by testing on Unicode 7.0, and the data
changed so that there was not a problem by Unicode 10.0.
-rw-r--r-- | regexec.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -10583,9 +10583,11 @@ Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target) /* If there is only a single script in common, set to that. * Otherwise, use the intersection going forward */ Safefree(intersection); + intersection = NULL; if (intersection_len == 1) { script_of_run = script_of_char = new_overlap[0]; Safefree(new_overlap); + new_overlap = NULL; } else { intersection = new_overlap; |