pgsql: Fix some possible low-memory failures in regexp compilation.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix some possible low-memory failures in regexp compilation.
Дата
Msg-id E1ZPNyY-00071O-Jm@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix some possible low-memory failures in regexp compilation.

newnfa() failed to set the regex error state when malloc() fails.
Several places in regcomp.c failed to check for an error after calling
subre().  Each of these mistakes could lead to null-pointer-dereference
crashes in memory-starved backends.

Report and patch by Andreas Seltenreich.  Back-patch to all branches.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/a54875602a057f8ee0cf5e880bfe2056b5dd11f0

Modified Files
--------------
src/backend/regex/regc_nfa.c |    3 +++
src/backend/regex/regcomp.c  |    3 +++
2 files changed, 6 insertions(+)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix some possible low-memory failures in regexp compilation.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix some possible low-memory failures in regexp compilation.