[BUG FIX] Uninitialized var fargtypes used.

Ranier VF <ranier_gyn@hotmail.com>

From: Ranier Vilela <ranier_gyn@hotmail.com>
To: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2019-11-11T17:03:33Z
Lists: pgsql-bugs

Attachments

Hi,
Can anyone check this bug fix?

Thanks.
Ranier Vilela

--- \dll\postgresql-12.0\a\backend\commands\event_trigger.c	Mon Sep 30 17:06:55 2019
+++ event_trigger.c	Mon Nov 11 13:52:35 2019
@@ -171,7 +171,7 @@
 	HeapTuple	tuple;
 	Oid			funcoid;
 	Oid			funcrettype;
-	Oid			fargtypes[1];	/* dummy */
+	Oid			fargtypes[1] = {InvalidOid, InvalidOid};	/* dummy */
 	Oid			evtowner = GetUserId();
 	ListCell   *lc;
 	List	   *tags = NULL;

Commits

  1. Finish reverting commit 0a52d378b.

  2. Have LookupFuncName accept NULL argtypes for 0 args

  3. Avoid passing NULL to memcmp() in lookups of zero-argument functions.