summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-03-05 18:40:59 +0000
committerNicholas Clark <nick@ccl4.org>2006-03-05 18:40:59 +0000
commit4164be692ecdc110086abd011eb6e1c41f13ed34 (patch)
tree3c4dadaeb80e56ae7c042c36768612e0c7160ee6 /hv.c
parent69ecfd1277806cc4f0867436789903927289b9b2 (diff)
downloadperl-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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hv.c b/hv.c
index 1a93d3cc9d..1f9cd296b6 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) {