mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
Fix potential NULL-pointer dereference.
Commit 2781b4bea7
arranged to defer
the setup of after-trigger-related data structures, but
AfterTriggerPendingOnRel didn't get the memo.
This commit is contained in:
@ -4776,7 +4776,7 @@ AfterTriggerPendingOnRel(Oid relid)
|
||||
* if TRUNCATE/etc is executed by a function or trigger within an updating
|
||||
* query on the same relation, which is pretty perverse, but let's check.
|
||||
*/
|
||||
for (depth = 0; depth <= afterTriggers.query_depth; depth++)
|
||||
for (depth = 0; depth <= afterTriggers.query_depth && depth < afterTriggers.maxquerydepth; depth++)
|
||||
{
|
||||
for_each_event_chunk(event, chunk, afterTriggers.query_stack[depth])
|
||||
{
|
||||
|
Reference in New Issue
Block a user