diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-05-29 11:09:48 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-05-29 11:15:57 -0400 |
commit | 5edb797598c6396fc75c9b382b15dbde7e3f5711 (patch) | |
tree | fcaff1f2564458c09c4b49c7dd0b70732b78b586 /pp_ctl.c | |
parent | bcc60db0a89f70ed34db50980def411d503ec429 (diff) | |
download | perl-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]; |