diff options
author | Father Chrysostomos <sprout@cpan.org> | 2016-05-10 14:14:40 -0700 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2017-08-08 17:47:17 +0100 |
commit | 9cff6a7672e984d7860a283a811161329f259c62 (patch) | |
tree | b9cf7ac0ba237b88521df055b1ee6d15e4f7da33 /sv.c | |
parent | a3660d0cfef825007244ec5e64168bdde98c91f4 (diff) | |
download | perl-9cff6a7672e984d7860a283a811161329f259c62.tar.gz |
[perl #128106] Fix reset with non-globs
reset with a string argument was assuming that anything in a
stash would be a glob. It crashed on anything else.
(cherry picked from commit fcd130693a9e7a753f63a08691ff619ad91bf8eb)
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -9706,6 +9706,8 @@ Perl_sv_resetpvn(pTHX_ const char *s, STRLEN len, HV * const stash) if (!todo[(U8)*HeKEY(entry)]) continue; gv = MUTABLE_GV(HeVAL(entry)); + if (!isGV(gv)) + continue; sv = GvSV(gv); if (sv && !SvREADONLY(sv)) { SV_CHECK_THINKFIRST_COW_DROP(sv); |