This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Do not invert a NULL cp_list.
authorJarkko Hietaniemi <jhi@iki.fi>
Fri, 9 May 2014 15:05:30 +0000 (11:05 -0400)
committerSteffen Mueller <smueller@cpan.org>
Wed, 28 May 2014 13:20:52 +0000 (15:20 +0200)
Fix for Coverity perl5 CID 28966.

regcomp.c

index eaee604..165a3c2 100644 (file)
--- 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)