pgsql: Be more paranoid about null return values from libpq status func
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Be more paranoid about null return values from libpq status func |
| Дата | |
| Msg-id | E1a1ibr-00085H-P9@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Be more paranoid about null return values from libpq status functions. PQhost() can return NULL in non-error situations, namely when a Unix-socket connection has been selected by default. That behavior is a tad debatable perhaps, but for the moment we should make sure that psql copes with it. Unfortunately, do_connect() failed to: it could pass a NULL pointer to strcmp(), resulting in crashes on most platforms. This was reported as a security issue by ChenQin of Topsec Security Team, but the consensus of the security list is that it's just a garden-variety bug with no security implications. For paranoia's sake, I made the keep_password test not trust PQuser or PQport either, even though I believe those will never return NULL given a valid PGconn. Back-patch to all supported branches. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/c5ef8ce53d37e276d70593ff0f4b06dd119cd3ff Modified Files -------------- src/bin/psql/command.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера