From: Philippe M. Chiasson Date: Wed, 30 Nov 2005 20:17:31 +0000 (-0800) Subject: [patch] Re: Perl PR: "Security holes in Sys::Syslog" X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d2641cbdd63e94a4edbbe5afa69104ed2a93d39f;p=p5sagit%2Fp5-mst-13.2.git [patch] Re: Perl PR: "Security holes in Sys::Syslog" From: "Philippe M. Chiasson" Message-ID: <438E795B.9060805@ActiveState.com> p4raw-id: //depot/perl@26235 --- diff --git a/sv.c b/sv.c index 20bc9c1..10aecd5 100644 --- a/sv.c +++ b/sv.c @@ -8909,6 +8909,10 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV need = (have > width ? have : width); gap = need - have; +#ifdef PERL_MALLOC_WRAP + if (need >= (((STRLEN)~0) - SvCUR(sv) - dotstrlen - 1)) + Perl_croak_nocontext(PL_memory_wrap); +#endif SvGROW(sv, SvCUR(sv) + need + dotstrlen + 1); p = SvEND(sv); if (esignlen && fill == '0') {