Re: [CHECKER] 9 potential out-of-bounds array access errors - Mailing list pgsql-bugs

From Yichen Xie
Subject Re: [CHECKER] 9 potential out-of-bounds array access errors
Date
Msg-id Pine.LNX.4.44.0301281621260.3200-100000@canoe
Whole thread Raw
In response to Re: [CHECKER] 9 potential out-of-bounds array access errors  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I think it's 'coz the only assignment to "plpgsql_nDatums" the checker
could find is on line 176, without realizing plpgsql_nDatums is actually a
global variable and could be changed anywhere... We'll rule out cases like
this in the future. Thanks for letting us know. --yichen

On Tue, 28 Jan 2003, Tom Lane wrote:

> I'm confused by the entry flagging pl_comp.c:527:
>
> [BUG] is plpgsql_nDatums 0 here? also, sizeof (plpgsql_nDatums) =
> 2*sizeof(PLpgSQL_datum *)
>
> Is the thing concerned because malloc(0) may yield NULL on some
> platforms?  If so, should I object that it ought to be smart enough to
> know the loop won't execute in that case?  Or am I missing something?
> Also, I don't understand your comment about the sizeof() relationship.
>
>             regards, tom lane
>

pgsql-bugs by date:

Previous
From: Yichen Xie
Date:
Subject: Re: [CHECKER] 9 potential out-of-bounds array access errors
Next
From: Tom Lane
Date:
Subject: Re: [CHECKER] 9 potential out-of-bounds array access errors