pgsql: Fix one-byte buffer overrun in contrib/test_parser.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix one-byte buffer overrun in contrib/test_parser.
Дата
Msg-id E1RkQ3J-0005bs-AM@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix one-byte buffer overrun in contrib/test_parser.

The original coding examined the next character before verifying that
there *is* a next character.  In the worst case with the input buffer
right up against the end of memory, this would result in a segfault.

Problem spotted by Paul Guyot; this commit extends his patch to fix an
additional case.  In addition, make the code a tad more readable by not
overloading the usage of *tlen.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/89b3c6cc8b560f7f46a6a25b270aed5330c09a0e

Modified Files
--------------
contrib/test_parser/test_parser.c |   19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix one-byte buffer overrun in contrib/test_parser.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix one-byte buffer overrun in contrib/test_parser.