pgsql: Add missing error check in regexp parser.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Add missing error check in regexp parser.
Дата
Msg-id E1UAj7u-0006kI-69@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Add missing error check in regexp parser.

parseqatom() failed to check for an error return (NULL result) from its
recursive call to parsebranch(), and in consequence could crash with a
null-pointer dereference after an error return.  This bug has been there
since day one, but wasn't noticed before, probably because most error cases
in parsebranch() didn't actually lead to returning NULL.  Add the missing
error check, and also tweak parsebranch() to exit in a less indirect
fashion after a call to parseqatom() fails.

Report by Tomasz Karlik, fix by me.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3ae9d4db47a942f7330ce69f954c8a2b58177236

Modified Files
--------------
src/backend/regex/regcomp.c |    2 ++
1 files changed, 2 insertions(+), 0 deletions(-)


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

Предыдущее
От: fxjr@cvs.pgfoundry.org
Дата:
Сообщение: npgsql - Npgsql2: [#1011310] Command timeouts after the first are not
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Add missing error check in regexp parser.