X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hv.c;h=1f9cd296b61968b730522b81af5623bc33b075e8;hb=33b5f13c2468a991d2b495f02a62b59163be82af;hp=1a93d3cc9d27d76188059689367d72b10386be6d;hpb=b37c2d43c8bccbefe3985273e9661833102148d0;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hv.c b/hv.c index 1a93d3c..1f9cd29 100644 --- a/hv.c +++ b/hv.c @@ -1943,7 +1943,7 @@ Perl_hv_eiter_set(pTHX_ HV *hv, HE *eiter) { } void -Perl_hv_name_set(pTHX_ HV *hv, const char *name, I32 len, int flags) +Perl_hv_name_set(pTHX_ HV *hv, const char *name, U32 len, U32 flags) { dVAR; struct xpvhv_aux *iter; @@ -1951,6 +1951,9 @@ Perl_hv_name_set(pTHX_ HV *hv, const char *name, I32 len, int flags) PERL_UNUSED_ARG(flags); + if (len > I32_MAX) + Perl_croak(aTHX_ "panic: hv name too long (%"UVuf")", (UV) len); + if (SvOOK(hv)) { iter = HvAUX(hv); if (iter->xhv_name) {