diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-03-05 18:40:59 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-03-05 18:40:59 +0000 |
commit | 4164be692ecdc110086abd011eb6e1c41f13ed34 (patch) | |
tree | 3c4dadaeb80e56ae7c042c36768612e0c7160ee6 /hv.c | |
parent | 69ecfd1277806cc4f0867436789903927289b9b2 (diff) | |
download | perl-4164be692ecdc110086abd011eb6e1c41f13ed34.tar.gz |
Change hv_name_set to take U32 length and flags parameters.
p4raw-id: //depot/perl@27381
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) { |