In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/00b25eff1415ab27d5829f30fea1fecd57a7934e?hp=a2d8379b96447607acb2221e284e1f5436dd64d8>

- Log -----------------------------------------------------------------
commit 00b25eff1415ab27d5829f30fea1fecd57a7934e
Author: Jarkko Hietaniemi <j...@iki.fi>
Date:   Fri May 9 18:49:25 2014 -0400

    si_names access one past the end.
    
    Fix for Coverity perl5 CID 45359.
-----------------------------------------------------------------------

Summary of changes:
 deb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/deb.c b/deb.c
index bccfc18..d16103e 100644
--- 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);

--
Perl5 Master Repository

Reply via email to