[PATCH][BUG_FIX] Potential null pointer dereferencing. - Mailing list pgsql-hackers

From Ranier Vilela
Subject [PATCH][BUG_FIX] Potential null pointer dereferencing.
Date
Msg-id MN2PR18MB2927E2212B324756CC6452D0E3770@MN2PR18MB2927.namprd18.prod.outlook.com
Whole thread Raw
Responses Re: [PATCH][BUG_FIX] Potential null pointer dereferencing.  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
Hi,
ExecClearTuple don't check por NULL pointer arg and according
TupIsNull slot can be NULL.

Can anyone check this buf fix?

--- \dll\postgresql-12.0\a\backend\executor\nodeUnique.c    Mon Sep 30 17:06:55 2019
+++ nodeUnique.c    Tue Nov 12 09:54:34 2019
@@ -74,7 +74,8 @@
         if (TupIsNull(slot))
         {
             /* end of subplan, so we're done */
-            ExecClearTuple(resultTupleSlot);
+            if (!TupIsNull(resultTupleSlot))
+                ExecClearTuple(resultTupleSlot);
             return NULL;
         }


Attachment

pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: MarkBufferDirtyHint() and LSN update
Next
From: Antonin Houska
Date:
Subject: Re: MarkBufferDirtyHint() and LSN update