diff options
author | Karl Williamson <khw@cpan.org> | 2014-04-28 21:10:48 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-05-30 15:58:40 -0600 |
commit | a283d99919666e4dba96ead467c038ed9179bf4f (patch) | |
tree | 1918399513e9c6b35c3556f1165048214429ff86 /regcomp.c | |
parent | dd2bfca9b7c4d502702489a8b15f14e9582e325a (diff) | |
download | perl-a283d99919666e4dba96ead467c038ed9179bf4f.tar.gz |
regcomp.c: Add assertion
This is because coverity thinks this could happen, and jhi and khw don't
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -13789,6 +13789,11 @@ parseit: ANYOF_POSIXL_ZERO(ret); } + /* Coverity thinks it is possible for this to be negative; both + * jhi and khw think it's not, but be safer */ + assert(! (ANYOF_FLAGS(ret) & ANYOF_POSIXL) + || (namedclass + ((namedclass % 2) ? -1 : 1)) >= 0); + /* See if it already matches the complement of this POSIX * class */ if ((ANYOF_FLAGS(ret) & ANYOF_POSIXL) |