]> granicus.if.org Git - postgresql/commit
Guard against null arguments in binary_upgrade_create_empty_extension().
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 3 Jan 2016 21:26:38 +0000 (16:26 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 3 Jan 2016 21:26:38 +0000 (16:26 -0500)
commit939d10cd8711fdeb7f0ff62c9c6b08e3eddbba3e
tree40431b4866e313d6716345b9f6729d4a52e46918
parentc6aeba353a15d71f584488a7482fb88337f843e3
Guard against null arguments in binary_upgrade_create_empty_extension().

The CHECK_IS_BINARY_UPGRADE macro is not sufficient security protection
if we're going to dereference pass-by-reference arguments before it.

But in any case we really need to explicitly check PG_ARGISNULL for all
the arguments of a non-strict function, not only the ones we expect null
values for.

Oversight in commits 30982be4e5019684e1772dd9170aaa53f5a8e894 and
f92fc4c95ddcc25978354a8248d3df22269201bc.  Found by Andreas Seltenreich.
(The other usages in pg_upgrade_support.c seem safe.)
src/backend/utils/adt/pg_upgrade_support.c