diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2016-02-06 19:28:00 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2016-02-07 08:23:46 -0500 |
commit | ea8da35cc190a817cc6f856224152c42806ec814 (patch) | |
tree | 8dd5b9f2a368d2c189dbe59f94378f379f5a3daa /regcomp.c | |
parent | c4f643b9fca4c4487ef74e4e6cd5b61a26025698 (diff) | |
download | perl-ea8da35cc190a817cc6f856224152c42806ec814.tar.gz |
Assert no bad array access.
Coverity CID 135147: Out-of-bounds access (OVERRUN)
Long-distance trouble: regexec.c:8922-ish calls (if DEBUGGING) the
regprop() in regcomp.c, which can access the five-element bounds[]
array with the flags value as the offset. However, Coverity thinks
it sees that in regexec.c the flags value may be up to nine.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -17659,6 +17659,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_ "{sb}", "{wb}" }; + assert(FLAGS(o) < C_ARRAY_LENGTH(bounds)); sv_catpv(sv, bounds[FLAGS(o)]); } else if (k == BRANCHJ && (OP(o) == UNLESSM || OP(o) == IFMATCH)) |