pgsql: Catch stack overflow when recursing in transformFromClauseItem()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Catch stack overflow when recursing in transformFromClauseItem()
Дата
Msg-id E1oMwhh-000dGP-H1@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Catch stack overflow when recursing in transformFromClauseItem().

Most parts of the parser can expect that the stack overflow check
in transformExprRecurse() will trigger before things get desperate.
However, transformFromClauseItem() can recurse directly to self
without having analyzed any expressions, so it's possible to drive
it to a stack-overrun crash.  Add a check to prevent that.

Per bug #17583 from Egor Chindyaskin.  Back-patch to all supported
branches.

Richard Guo

Discussion: https://postgr.es/m/17583-33be55b9f981f75c@postgresql.org

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/362032f1768e0c0792fb713234ea1db2ebfaf90d

Modified Files
--------------
src/backend/parser/parse_clause.c | 3 +++
1 file changed, 3 insertions(+)


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.
Следующее
От: Noah Misch
Дата:
Сообщение: Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.