develooper Front page | perl.perl5.porters | Postings from April 2006

Re: [PATCH] perlio.c: layer data might be allocated and unused (Coverity)

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
April 15, 2006 03:52
Subject:
Re: [PATCH] perlio.c: layer data might be allocated and unused (Coverity)
Message ID:
20060415105203.GU32132@plum.flirble.org
On Sat, Apr 15, 2006 at 11:24:17AM +0300, Jarkko Hietaniemi wrote:

I don't think you meant this:

>  	/* Real layer with a data area */
> -	Newxc(l,tab->size,char,PerlIOl);
> -	if (l && f) {
> -	    Zero(l, tab->size, char);

> +	if (f) {
> +	    Newxz(l, tab->size, char, PerlIOl);
> +	    if (l) {

I think you meant this:

+           char *temp;
+           Newxz(temp, tab->size, char);
+           l = (PerlIOl*)temp;

so I applied that instead (change 27809)

Thanks.

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