From: Tye McQueen Date: Thu, 1 May 2003 13:34:50 +0000 (-0500) Subject: Re: hv.c patch - pathological hashes too easy X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=462d8b025fb2f0b0f3b03c2b1a0b9a1d4406346c;p=p5sagit%2Fp5-mst-13.2.git Re: hv.c patch - pathological hashes too easy From: "Tye McQueen" Message-Id: <200305011834.h41IYoE08503@metronet.com> p4raw-id: //depot/perl@19423 --- diff --git a/hv.c b/hv.c index 5abfc62..e018a75 100644 --- a/hv.c +++ b/hv.c @@ -703,8 +703,8 @@ Perl_hv_store_flags(pTHX_ HV *hv, const char *key, I32 klen, SV *val, xhv->xhv_keys++; /* HvKEYS(hv)++ */ if (i) { /* initial entry? */ xhv->xhv_fill++; /* HvFILL(hv)++ */ - if (xhv->xhv_keys > (IV)xhv->xhv_max /* HvKEYS(hv) > HvMAX(hv) */) - hsplit(hv); + } else if (xhv->xhv_keys > (IV)xhv->xhv_max /* HvKEYS(hv) > HvMAX(hv) */) { + hsplit(hv); } return &HeVAL(entry);