]> granicus.if.org Git - postgresql/commit
Protect against NULL-dereference in pg_dump
authorStephen Frost <sfrost@snowman.net>
Fri, 6 Jan 2017 20:27:50 +0000 (15:27 -0500)
committerStephen Frost <sfrost@snowman.net>
Fri, 6 Jan 2017 20:27:50 +0000 (15:27 -0500)
commit8b1bf3161b360003182997b4e258b8fac78c3bdf
tree48af475ac17b3dc6194327c7530da2654c09db9c
parent4103a2f200d6050b6c71e5c3c79c70ea98020307
Protect against NULL-dereference in pg_dump

findTableByOid() is allowed to return NULL and we should therefore be
checking for that case.  getOwnedSeqs() and dumpSequence() shouldn't
ever actually see this happen, but given odd circumstances it might and
commit f9e439b1 probably shouldn't have removed that check.

Pointed out by Coverity.  Initial patch from Michael Paquier.

Back-patch to 9.6, where that commit had removed the check.
src/bin/pg_dump/pg_dump.c