Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit60f8763

Browse files
committed
Catch stack overflow when recursing in transformFromClauseItem().
Most parts of the parser can expect that the stack overflow checkin transformExprRecurse() will trigger before things get desperate.However, transformFromClauseItem() can recurse directly to selfwithout having analyzed any expressions, so it's possible to driveit to a stack-overrun crash. Add a check to prevent that.Per bug #17583 from Egor Chindyaskin. Back-patch to all supportedbranches.Richard GuoDiscussion:https://postgr.es/m/17583-33be55b9f981f75c@postgresql.org
1 parent8b2638f commit60f8763

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/backend/parser/parse_clause.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,9 @@ transformFromClauseItem(ParseState *pstate, Node *n,
10551055
ParseNamespaceItem**top_nsitem,
10561056
List**namespace)
10571057
{
1058+
/* Guard against stack overflow due to overly deep subtree */
1059+
check_stack_depth();
1060+
10581061
if (IsA(n,RangeVar))
10591062
{
10601063
/* Plain relation reference, or perhaps a CTE reference */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp