This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2d8379
)
si_names access one past the end.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Fri, 9 May 2014 22:49:25 +0000
(18:49 -0400)
committer
Tony Cook
<tony@develop-help.com>
Thu, 29 May 2014 06:43:42 +0000
(16:43 +1000)
Fix for Coverity perl5 CID 45359.
deb.c
patch
|
blob
|
blame
|
history
diff --git
a/deb.c
b/deb.c
index
bccfc18
..
d16103e
100644
(file)
--- a/
deb.c
+++ b/
deb.c
@@
-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);