Re: small fix to possible null pointer dereference in byteaout() varlena.c

Поиск
Список
Период
Сортировка
От Grzegorz Jaśkiewicz
Тема Re: small fix to possible null pointer dereference in byteaout() varlena.c
Дата
Msg-id AANLkTi=u9vVNgeGeXaGpkA-FjDQjBu_2wp+GNWHD0ihK@mail.gmail.com
обсуждение исходный текст
Ответ на Re: small fix to possible null pointer dereference in byteaout() varlena.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: small fix to possible null pointer dereference in byteaout() varlena.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: small fix to possible null pointer dereference in byteaout() varlena.c  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
2010/9/28 Tom Lane <tgl@sss.pgh.pa.us>:
> Grzegorz Jaśkiewicz <gryzman@gmail.com> writes:
>> It would crash if input is of unrecognized format. Probably than
>> there's going to be more problems to be concerned with, but just in
>> case, don't crash in
>
> I'm not sure why you think this is a good change, but it would break
> things: in particular, the code would fail to null-terminate the string
> in the hex-output case.  Also, the case that you seem to be trying to
> defend against can't happen because elog(ERROR) doesn't return.
>

...               rp = result = NULL;             /* keep compiler quiet */       }       *rp = '\0';
....

this strikes me as a clear case of possible null pointer dereference,
wouldn't you agree ?
I know the case is very corner-ish, but still valid imo.




--
GJ


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: security label support, revised
Следующее
От: Robert Haas
Дата:
Сообщение: Re: security label support, revised