mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
Add missing check_stack_depth() to some recursive functions
Reported-by: Egor Chindyaskin, Alexander Lakhin Discussion: https://postgr.es/m/1672760457.940462079%40f306.i.mail.ru
This commit is contained in:
@ -1674,6 +1674,9 @@ executeBoolItem(JsonPathExecContext *cxt, JsonPathItem *jsp,
|
||||
JsonPathBool res;
|
||||
JsonPathBool res2;
|
||||
|
||||
/* since this function recurses, it could be driven to stack overflow */
|
||||
check_stack_depth();
|
||||
|
||||
if (!canHaveNext && jspHasNext(jsp))
|
||||
elog(ERROR, "boolean jsonpath item cannot have next item");
|
||||
|
||||
|
Reference in New Issue
Block a user