pgsql: Prevent stack overflow in exprLocation()
Started by Heikki Linnakangas2 days ago1 messagescommitters
Stepping through
Prevent stack overflow in exprLocation()
exprLocation() recurses down to the leftmost token of an expression
without checking the stack depth. A statement like:
(SELECT 1 ORDER BY 1) ORDER BY 1+1+...+1
with a million terms therefore crashed the backend while computing the
error position for "multiple ORDER BY clauses not allowed".
Author: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: /messages/by-id/CAN4CZFOJzyQ73OxeyRs2QCh7FfBDWqEAsNDiKm1G0hB9Cn6fhw@mail.gmail.com
Backpatch-through: 15
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/5fd37fe568586a0ec56275b3086a0bd4e3a6e293
Modified Files
--------------
src/backend/nodes/nodeFuncs.c | 4 ++++
1 file changed, 4 insertions(+)