public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrey V. Lepikhov <[email protected]>
Subject: [PATCH] More secure initialization of required_relids field
Date: Mon, 15 Jul 2019 11:07:20 +0500

---
 src/backend/optimizer/util/restrictinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/optimizer/util/restrictinfo.c b/src/backend/optimizer/util/restrictinfo.c
index 3b50fd29ad..450558e61b 100644
--- a/src/backend/optimizer/util/restrictinfo.c
+++ b/src/backend/optimizer/util/restrictinfo.c
@@ -172,7 +172,7 @@ make_restrictinfo_internal(Expr *clause,
 	if (required_relids != NULL)
 		restrictinfo->required_relids = required_relids;
 	else
-		restrictinfo->required_relids = restrictinfo->clause_relids;
+		restrictinfo->required_relids = bms_copy(restrictinfo->clause_relids);
 
 	/*
 	 * Fill in all the cacheable fields with "not yet set" markers. None of
-- 
2.17.1


--------------733A58098BF09C1863AF9B05--





view thread (9+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [PATCH] More secure initialization of required_relids field
  In-Reply-To: <no-message-id-1882048@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox