summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-03-01 17:46:49 +0000
committerNicholas Clark <nick@ccl4.org>2007-03-01 17:46:49 +0000
commitbf11fd37daadd699e7214d2f9150186bcfa8441f (patch)
tree8facdb57f8f7176f105af40af0f3a0434afda7c6 /hv.c
parent5be41be4072fd5cea66cae4e0e2cdfd32753ce89 (diff)
downloadperl-bf11fd37daadd699e7214d2f9150186bcfa8441f.tar.gz
The bug fixed by change 29610 would have been avoided with this
assertion - ensure that the hek argument to Perl_unshare_hek() is not NULL, because if it is, then S_unshare_hek_or_pvn() will merrily unshare the string "" instead. p4raw-id: //depot/perl@30440
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hv.c b/hv.c
index cb4eda9952..4831ccd563 100644
--- a/hv.c
+++ b/hv.c
@@ -2289,6 +2289,7 @@ Perl_unsharepvn(pTHX_ const char *str, I32 len, U32 hash)
void
Perl_unshare_hek(pTHX_ HEK *hek)
{
+ assert(hek);
unshare_hek_or_pvn(hek, NULL, 0, 0);
}