Re: [CHECKER] 9 potential out-of-bounds array access errors

Поиск
Список
Период
Сортировка
От Yichen Xie
Тема Re: [CHECKER] 9 potential out-of-bounds array access errors
Дата
Msg-id Pine.LNX.4.44.0301281621260.3200-100000@canoe
обсуждение исходный текст
Ответ на Re: [CHECKER] 9 potential out-of-bounds array access errors  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Yichen Xie
Дата:
Сообщение: Re: [CHECKER] 9 potential out-of-bounds array access errors
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [CHECKER] 9 potential out-of-bounds array access errors