Skip to content

Commit c8df947

Browse files
committed
Fix potential NULL-pointer dereference.
Commit 2781b4b arranged to defer the setup of after-trigger-related data structures, but AfterTriggerPendingOnRel didn't get the memo.
1 parent bf7ca15 commit c8df947

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/commands/trigger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4776,7 +4776,7 @@ AfterTriggerPendingOnRel(Oid relid)
47764776
* if TRUNCATE/etc is executed by a function or trigger within an updating
47774777
* query on the same relation, which is pretty perverse, but let's check.
47784778
*/
4779-
for (depth = 0; depth <= afterTriggers.query_depth; depth++)
4779+
for (depth = 0; depth <= afterTriggers.query_depth && depth < afterTriggers.maxquerydepth; depth++)
47804780
{
47814781
for_each_event_chunk(event, chunk, afterTriggers.query_stack[depth])
47824782
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy