This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Assert before deref due to possible NULL.
authorJarkko Hietaniemi <jhi@iki.fi>
Sun, 29 Jun 2014 12:47:17 +0000 (08:47 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 30 Jun 2014 11:46:07 +0000 (07:46 -0400)
Coverity perl5 CID 68587.

regexec.c

index 88615a4..9100e47 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -6188,6 +6188,7 @@ NULL
                /* calculate c1 and c2 for possible match of 1st char
                 * following curly */
                ST.c1 = ST.c2 = CHRTEST_VOID;
+                assert(ST.B);
                if (HAS_TEXT(ST.B) || JUMPABLE(ST.B)) {
                    regnode *text_node = ST.B;
                    if (! HAS_TEXT(text_node))