develooper Front page | perl.perl5.porters | Postings from April 2006

[PATCH] regexec.c: (Coverity) add NULL check

Thread Next
From:
Jarkko Hietaniemi
Date:
April 13, 2006 05:53
Subject:
[PATCH] regexec.c: (Coverity) add NULL check
Message ID:
200604131252.k3DCqFUL497781@kosh.hut.fi
--- regexec.c.dist	2006-04-13 15:45:11.000000000 +0300
+++ regexec.c	2006-04-13 15:47:18.000000000 +0300
@@ -3780,7 +3780,7 @@
 	    {
 		I32 type;
 		type = OP(scan);
-		if (OP(next) != type)	/* No choice. */
+		if (!next || OP(next) != type)	/* No choice. */
 		    next = inner;	/* Avoid recursion. */
 		else {
 		    const I32 lastparen = *PL_reglastparen;

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About