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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [CHECKER] 9 potential out-of-bounds array access errors
Дата
Msg-id 12211.1043798734@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [CHECKER] 9 potential out-of-bounds array access errors  ("Yichen Xie" <yxie@cs.stanford.edu>)
Ответы Re: [CHECKER] 9 potential out-of-bounds array access errors  (Yichen Xie <yxie@cs.stanford.edu>)
Список pgsql-bugs
Yichen Xie <yxie@cs.stanford.edu> writes:
> Both are flagged though--the other one's 85 lines down in the bug report..
> ;) I probably should've sorted the list by location to minimize confusion.

That's okay, I probably should've read the whole mail before commenting ;-)


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 по дате отправления:

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