In perl.git, the branch smoke-me/ilmari/array-index-out-of-range has been 
updated

<https://perl5.git.perl.org/perl.git/commitdiff/3a2a91c58a2565763dd556e0caee294b452e7a1d?hp=796cc3903520a0cf874b8fa449629d8dacc6fa15>

- Log -----------------------------------------------------------------
commit 3a2a91c58a2565763dd556e0caee294b452e7a1d
Author: Dagfinn Ilmari Mannsåker <ilm...@ilmari.org>
Date:   Sat Apr 27 11:01:51 2019 +0100

    Unconst the keyname argument to varname()
    
    When used as an array index, we may end up coercing it to an integer.

-----------------------------------------------------------------------

Summary of changes:
 embed.fnc | 2 +-
 proto.h   | 2 +-
 sv.c      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/embed.fnc b/embed.fnc
index 45597f67b6..2f43283ec0 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -2689,7 +2689,7 @@ poM       |void   |sv_kill_backrefs       |NN SV *const 
sv|NULLOK AV *const av
 
 #if defined(PERL_IN_SV_C) || defined (PERL_IN_OP_C)
 pR     |SV *   |varname        |NULLOK const GV *const gv|const char gvtype \
-                               |PADOFFSET targ|NULLOK const SV *const keyname \
+                               |PADOFFSET targ|NULLOK SV *const keyname \
                                |SSize_t aindex|int subscript_type
 #endif
 
diff --git a/proto.h b/proto.h
index 0f8feed187..8c84ab0d4e 100644
--- a/proto.h
+++ b/proto.h
@@ -6043,7 +6043,7 @@ STATIC void       S_unreferenced_to_tmp_stack(pTHX_ AV 
*const unreferenced);
 #  endif
 #endif
 #if defined(PERL_IN_SV_C) || defined (PERL_IN_OP_C)
-PERL_CALLCONV SV *     Perl_varname(pTHX_ const GV *const gv, const char 
gvtype, PADOFFSET targ, const SV *const keyname, SSize_t aindex, int 
subscript_type)
+PERL_CALLCONV SV *     Perl_varname(pTHX_ const GV *const gv, const char 
gvtype, PADOFFSET targ, SV *const keyname, SSize_t aindex, int subscript_type)
                        __attribute__warn_unused_result__;
 
 #endif
diff --git a/sv.c b/sv.c
index 16028f43f5..9961a5f09c 100644
--- a/sv.c
+++ b/sv.c
@@ -16167,7 +16167,7 @@ S_find_array_subscript(pTHX_ const AV *const av, const 
SV *const val)
 
 SV*
 Perl_varname(pTHX_ const GV *const gv, const char gvtype, PADOFFSET targ,
-       const SV *const keyname, SSize_t aindex, int subscript_type)
+            SV *const keyname, SSize_t aindex, int subscript_type)
 {
 
     SV * const name = sv_newmortal();

-- 
Perl5 Master Repository

Reply via email to