develooper Front page | perl.perl5.porters | Postings from December 2005

Re: [PATCH] Re: Perl PR: "Security holes in Sys::Syslog"

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
December 1, 2005 07:52
Subject:
Re: [PATCH] Re: Perl PR: "Security holes in Sys::Syslog"
Message ID:
20051201155226.GD68284@plum.flirble.org
On Thu, Dec 01, 2005 at 07:45:48AM -0800, Jan Dubois wrote:
> On Thu, 01 Dec 2005, Gisle Aas wrote:
> > 
> > This patch plugs that hole.
> 
> PL_memory_wrap is only defined if you have PERL_MALLOC_WRAP enabled,
> so you need to check for it:
> 
>  
> > --- perl-current/sv.c	2005-12-01 10:56:34.000000000 +0100
> > +++ perl-hack/sv.c	2005-12-01 15:15:01.000000000 +0100
> > @@ -8889,6 +8889,8 @@
> > 
> >  	/* calculate width before utf8_upgrade changes it */
> >  	have = esignlen + zeros + elen;
> 
> #ifdef PERL_MALLOC_WRAP
> 
> > +	if (have < zeros)
> > +	    Perl_croak_nocontext(PL_memory_wrap);
> 
> #endif

Alternatively change it so that PL_memory_wrap always be defined?

I believe that the new test here will work on all platforms, even those where
the generic memory wrap macros don't.


Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About