Re: [PATCH] pgcrypto: Test for NULL before dereferencing pointer

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: [PATCH] pgcrypto: Test for NULL before dereferencing pointer
Дата
Msg-id AANLkTi=E75Bp2nWah_soJVwXCSfYYO+WkxApVTMZfapY@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] pgcrypto: Test for NULL before dereferencing pointer  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: [PATCH] pgcrypto: Test for NULL before dereferencing pointer  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Oct 20, 2010 at 22:34, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> Did coccicheck find anything else interesting?

There's a file descriptor leak in psql/command.c function
process_file() -- on errors it just returns without closing the file.
But since it's quitting anyway, there's no practical impact. Should I
submit a patch for this as well?

Then there are a few more cases found by null_ref (same check as the
original patch). But on closer inspection, these are false positives,
because the variable is actually modified in between dereferencing and
the NULL check.

Then there's the 'badzero' check that finds a dozen cases where
pointers are compared to a literal 0, not a NULL. This is a only a
coding style check, as far as I can tell, so I thought it's not worth
it.

Regards,
Marti


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: WIP: extensible enums
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Creation of temporary tables on read-only standby servers