summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2016-02-03 08:11:14 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2016-02-07 08:23:46 -0500
commit4b5c941e759b9302cc3663703de38cb61f3554db (patch)
treea0edb975713e68c82a21ba54255867f14170eedd /pp_hot.c
parent71d19c377e6e65ed965e367cd3b5d2233e093857 (diff)
downloadperl-4b5c941e759b9302cc3663703de38cb61f3554db.tar.gz
assert() that itersvp is non-NULL.
Coverity CID 135011 Explicit null derefenced In pp_iter() there are multiple derefers of *itersvp, but at the setting of itersvp the CxITERVAR() can return NULL, add an assert() to catch the badness in debug builds (as the Coverity builds are).
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 1a2a725f76..d5c11724c3 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2632,6 +2632,7 @@ PP(pp_iter)
cx = CX_CUR();
itersvp = CxITERVAR(cx);
+ assert(itersvp);
switch (CxTYPE(cx)) {