diff options
author | David Mitchell <davem@iabyn.com> | 2012-06-14 13:10:08 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2012-06-14 13:10:08 +0100 |
commit | c8d84f8c67ae20ce66d0a8e68579817d47224ab2 (patch) | |
tree | 501ff952b3ec9127f54112708e9df7a5cee36e1d /regcomp.c | |
parent | eb58a7e122f6228be1255f72e5f8e9834727ffdf (diff) | |
download | perl-c8d84f8c67ae20ce66d0a8e68579817d47224ab2.tar.gz |
run-time /(?{})/: fix an buffer overrun
String length calculation didn't allow for trailing nul.
(spotted by Nicholas)
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5041,7 +5041,7 @@ S_compile_runtime_code(pTHX_ RExC_state_t * const pRExC_state, int n = 0; STRLEN s; char *p, *newpat; - int newlen = plen + 5; /* allow for "qr''x" extra chars */ + int newlen = plen + 6; /* allow for "qr''x\0" extra chars */ SV *sv, *qr_ref; dSP; |