diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-10-05 22:13:35 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-10-06 13:01:18 -0700 |
commit | f1c07be4129bd6df320f25e77520c9725c21b9ba (patch) | |
tree | b86891995ed07c93fc99de0cd88b6b9922fcfe09 /gv.c | |
parent | 7833c8a6c843957351c2d3abf519e98cf2f5feab (diff) | |
download | perl-f1c07be4129bd6df320f25e77520c9725c21b9ba.tar.gz |
gv.c: Use name_end to avoid compiler warning
In this code path, name_cursor could be uninitialised if
gv_fetchpvn_flags is called with GV_NOTQUAL|GV_ADDWARN. Whenever it
is initialised, it is the same as name_end by the time this part
of the function is reached.
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1643,7 +1643,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, if (add & GV_ADDWARN) Perl_ck_warner_d(aTHX_ packWARN(WARN_INTERNAL), "Had to create %"SVf" unexpectedly", - SVfARG(newSVpvn_flags(nambeg, name_cursor-nambeg, SVs_TEMP | is_utf8 ))); + SVfARG(newSVpvn_flags(nambeg, name_end-nambeg, SVs_TEMP | is_utf8 ))); gv_init_pvn(gv, stash, name, len, (add & GV_ADDMULTI)|is_utf8); if ( isIDFIRST_lazy_if(name, is_utf8) |