From: Jarkko Hietaniemi Date: Fri, 9 May 2014 15:05:30 +0000 (-0400) Subject: Do not invert a NULL cp_list. X-Git-Tag: v5.21.1~458 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/e76fdebf5815ffaf53ebcfd2c7b78b0e9eacbfd2?hp=0acfb02fed689f2745813114bae77c22a2211cc7 Do not invert a NULL cp_list. Fix for Coverity perl5 CID 28966. --- diff --git a/regcomp.c b/regcomp.c index eaee604..165a3c2 100644 --- a/regcomp.c +++ b/regcomp.c @@ -14662,7 +14662,8 @@ parseit: * at compile time. Besides not inverting folded locale now, we can't * invert if there are things such as \w, which aren't known until runtime * */ - if (invert + if (cp_list + && invert && ! (ANYOF_FLAGS(ret) & (ANYOF_LOCALE_FLAGS)) && ! depends_list && ! HAS_NONLOCALE_RUNTIME_PROPERTY_DEFINITION)