[COMMITTERS] pgsql: Avoid improbable null pointer dereference inpgpassfileWarning()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема [COMMITTERS] pgsql: Avoid improbable null pointer dereference inpgpassfileWarning()
Дата
Msg-id E1cZS43-0007Ee-W3@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Avoid improbable null pointer dereference in pgpassfileWarning().

Coverity complained that we might pass a null pointer to strcmp()
if PQresultErrorField were to return NULL.  That shouldn't be possible,
since the server is supposed to always provide some SQLSTATE or other
in an error message.  But we usually defend against such hazards, and
it only takes a little more code to do so here.

There's no good reason to think this is a live bug, so no back-patch.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8ac0365c22f20dcd2a6b6752b95b665ada83e858

Modified Files
--------------
src/interfaces/libpq/fe-connect.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: Fix placement of initPlans when forcibly materializing asubplan
Следующее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: Clean up psql's behavior for a few more control variables.