CVE-2013-7422.diff   [plain text]


--- regcomp.c.orig	2015-07-02 17:45:20.000000000 -0700
+++ regcomp.c	2015-07-02 17:46:00.000000000 -0700
@@ -10652,6 +10652,9 @@
 		        goto parse_named_seq;
 		}   }
 		num = atoi(RExC_parse);
+		if (num < 0) {
+		    vFAIL("Integer wrapped");
+		}
 		if (isg && num == 0)
 		    vFAIL("Reference to invalid group 0");
                 if (isrel) {