diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-10-31 10:15:12 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-10-31 10:15:12 +0000 |
commit | 3792316810e8efe46eb83b553a1fffc0e1a35b80 (patch) | |
tree | 8d0857ae57ace287602478df1ab616595ce85124 | |
parent | 8a6e5c043e3987ad386f9f3b61130c021c5c1b95 (diff) | |
download | perl-3792316810e8efe46eb83b553a1fffc0e1a35b80.tar.gz |
Fix (or hide?) a case of memory corruption with \K in substitutions
p4raw-id: //depot/perl@32206
-rw-r--r-- | regcomp.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -6898,6 +6898,11 @@ tryagain: RExC_seen_zerolen++; ret = reg_node(pRExC_state, KEEPS); *flagp |= SIMPLE; + /* XXX:dmq : disabling in-place substitution seems to + * be necessary here to avoid cases of memory corruption, as + * with: C<$_="x" x 80; s/x\K/y/> -- rgs + */ + RExC_seen |= REG_SEEN_LOOKBEHIND; goto finish_meta_pat; case 'Z': ret = reg_node(pRExC_state, SEOL); |