Re: Buffer overflow in contrib/test_parser/test_parser.c

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Buffer overflow in contrib/test_parser/test_parser.c
Дата
Msg-id 7426.1326156051@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Buffer overflow in contrib/test_parser/test_parser.c  (Paul Guyot <pguyot@kallisys.net>)
Список pgsql-hackers
Paul Guyot <pguyot@kallisys.net> writes:
> There is a buffer overflow in sample code's test_parser.c that can yield to a segmentation fault. The next byte of
thebuffer is tested against ' ' before its availability is checked.
 

Hmm, yeah.  The probability of a failure is very low of course, but
still it'd be better if the sample code didn't have bugs like this.

> You will find attached a simple patch that fixes the bug.

Will apply, thank you.
        regards, tom lane


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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: LWLOCK_STATS
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: 16-bit page checksums for 9.2