diff options
author | Lukas Mai <l.mai@web.de> | 2017-11-12 02:58:32 +0100 |
---|---|---|
committer | Lukas Mai <l.mai@web.de> | 2017-11-12 03:15:27 +0100 |
commit | 4efcdc0252c3ba1728081298180489b8772bc6d6 (patch) | |
tree | 10c8b6bc15104061ad1c466e3c63b1ab2dd4aa8c /toke.c | |
parent | d1ac83c4011b4bf51ca3fb070737a97a6c6ac545 (diff) | |
download | perl-4efcdc0252c3ba1728081298180489b8772bc6d6.tar.gz |
prevent invalid memory access in S_check_uni (RT #132433)
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1935,7 +1935,7 @@ S_check_uni(pTHX) s = PL_last_uni; while (isWORDCHAR_lazy_if_safe(s, PL_bufend, UTF) || *s == '-') s += UTF ? UTF8SKIP(s) : 1; - if (memchr(s, '(', PL_bufptr - s)) + if (s < PL_bufptr && memchr(s, '(', PL_bufptr - s)) return; Perl_ck_warner_d(aTHX_ packWARN(WARN_AMBIGUOUS), |