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:
322c251
)
S_glob_assign_glob was using a potentially freed HV
author
Father Chrysostomos
<sprout@cpan.org>
Sat, 23 Oct 2010 16:48:31 +0000
(09:48 -0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Sat, 23 Oct 2010 16:50:03 +0000
(09:50 -0700)
sv.c
patch
|
blob
|
blame
|
history
diff --git
a/sv.c
b/sv.c
index
8db10dc
..
a091bf0
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-3629,7
+3629,11
@@
S_glob_assign_glob(pTHX_ SV *const dstr, SV *const sstr, const int dtype)
/* Set aside the old stash, so we can reset isa caches on
its subclasses. */
- old_stash = GvHV(dstr);
+ if((old_stash = GvHV(dstr)))
+ /* Make sure we do not lose it early. */
+ SvREFCNT_inc_simple_void_NN(
+ sv_2mortal((SV *)old_stash)
+ );
}
}
}