pgsql: Avoid null pointer dereference if error result lacks SQLSTATE.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Avoid null pointer dereference if error result lacks SQLSTATE.
Дата
Msg-id E1kZGCL-0001PO-S0@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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.

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/dd7ae03f8c2a5dbadd4e7e1f288afcecfedbfb32

Modified Files
--------------
src/bin/pg_dump/pg_backup_db.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Preserve index data in pg_statistic across REINDEX CONCURRENTLY
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix two issues in TOAST decompression.