Change 27381 by [EMAIL PROTECTED] on 2006/03/05 18:40:59
Change hv_name_set to take U32 length and flags parameters.
Affected files ...
... //depot/perl/embed.fnc#322 edit
... //depot/perl/hv.c#292 edit
... //depot/perl/proto.h#669 edit
Differences ...
==== //depot/perl/embed.fnc#322 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#321~27377~ 2006-03-05 03:53:55.000000000 -0800
+++ perl/embed.fnc 2006-03-05 10:40:59.000000000 -0800
@@ -1527,7 +1527,7 @@
ApoR |HE** |hv_eiter_p |NN HV* hv
Apo |void |hv_riter_set |NN HV* hv|I32 riter
Apo |void |hv_eiter_set |NN HV* hv|NULLOK HE* eiter
-Ap |void |hv_name_set |NN HV* hv|NULLOK const char *name|I32 len|int
flags
+Ap |void |hv_name_set |NN HV* hv|NULLOK const char *name|U32 len|U32
flags
poM |AV** |hv_backreferences_p |NN HV* hv
#if defined(PERL_IN_DUMP_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C)
|| defined(PERL_DECL_PROT)
poM |void |hv_kill_backrefs |NN HV* hv
==== //depot/perl/hv.c#292 (text) ====
Index: perl/hv.c
--- perl/hv.c#291~27334~ 2006-02-27 03:06:30.000000000 -0800
+++ perl/hv.c 2006-03-05 10:40:59.000000000 -0800
@@ -1943,7 +1943,7 @@
}
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_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) {
==== //depot/perl/proto.h#669 (text+w) ====
Index: perl/proto.h
--- perl/proto.h#668~27377~ 2006-03-05 03:53:55.000000000 -0800
+++ perl/proto.h 2006-03-05 10:40:59.000000000 -0800
@@ -4106,7 +4106,7 @@
PERL_CALLCONV void Perl_hv_eiter_set(pTHX_ HV* hv, HE* eiter)
__attribute__nonnull__(pTHX_1);
-PERL_CALLCONV void Perl_hv_name_set(pTHX_ HV* hv, const char *name, I32
len, int flags)
+PERL_CALLCONV void Perl_hv_name_set(pTHX_ HV* hv, const char *name, U32
len, U32 flags)
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV AV** Perl_hv_backreferences_p(pTHX_ HV* hv)
End of Patch.