]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Avoid null pointer dereference if error result lacks SQLSTATE.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 1 Nov 2020 16:26:16 +0000 (11:26 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 1 Nov 2020 16:26:41 +0000 (11:26 -0500)
commitdd7ae03f8c2a5dbadd4e7e1f288afcecfedbfb32
tree2260e7ce6d72638c9054d8c374605cd8536b8d74
parentc39f4e81dc21406d610d0340a9a2e1d34c3372d3
Avoid null pointer dereference if error result lacks SQLSTATE.

Although error results received from the backend should always have
a SQLSTATE field, ones generated by libpq won't, making this code
vulnerable to a crash after, say, untimely loss of connection.
Noted by Coverity.

Oversight in commit 403a3d91c.  Back-patch to 9.5, as that was.
src/bin/pg_dump/pg_backup_db.c