diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-05-09 18:49:25 -0400 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2014-05-29 16:43:42 +1000 |
commit | 00b25eff1415ab27d5829f30fea1fecd57a7934e (patch) | |
tree | 409bd6e05cb1beee08e22579549de91a6aa4360f /deb.c | |
parent | a2d8379b96447607acb2221e284e1f5436dd64d8 (diff) | |
download | perl-00b25eff1415ab27d5829f30fea1fecd57a7934e.tar.gz |
si_names access one past the end.
Fix for Coverity perl5 CID 45359.
Diffstat (limited to 'deb.c')
-rw-r--r-- | deb.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -217,7 +217,9 @@ Perl_deb_stack_all(pTHX) for (;;) { const size_t si_name_ix = si->si_type+1; /* -1 is a valid index */ - const char * const si_name = (si_name_ix >= sizeof(si_names)) ? "????" : si_names[si_name_ix]; + const char * const si_name = + si_name_ix < C_ARRAY_LENGTH(si_names) ? + si_names[si_name_ix] : "????"; I32 ix; PerlIO_printf(Perl_debug_log, "STACK %"IVdf": %s\n", (IV)si_ix, si_name); |