summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-05-29 11:09:48 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-05-29 11:15:57 -0400
commit5edb797598c6396fc75c9b382b15dbde7e3f5711 (patch)
treefcaff1f2564458c09c4b49c7dd0b70732b78b586 /pp_ctl.c
parentbcc60db0a89f70ed34db50980def411d503ec429 (diff)
downloadperl-5edb797598c6396fc75c9b382b15dbde7e3f5711.tar.gz
Strengthen the ix zero min-clamping to panic.
Currently the ix cannot ever be less than zero (detected by Coverity). Furthermore, it probably should never get less than zero, so panic if that ever happens. [perl #121897] Fix for Coverity perl5 CID 28946: at_least: At condition ix < 0, the value of ix must be at least 0. dead_error_condition: The condition ix < 0 cannot be true. Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement ix = 0;
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index a5c29a0bd9..bbd714941b 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3098,7 +3098,7 @@ PP(pp_goto) /* also pp_dump */
I32 oldsave;
if (ix < 0)
- ix = 0;
+ DIE(aTHX_ "panic: docatch: illegal ix=%ld", (long)ix);
dounwind(ix);
TOPBLOCK(cx);
oldsave = PL_scopestack[PL_scopestack_ix];