Explicit NULL dereference (src/backend/utils/adt/ruleutils.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Explicit NULL dereference (src/backend/utils/adt/ruleutils.c)
Дата
Msg-id CAEudQApoA=tMTic6xEPYP_hsNZ8XtToVThK_0x7D_aFQYowq3w@mail.gmail.com
обсуждение исходный текст
Ответы Re: Explicit NULL dereference (src/backend/utils/adt/ruleutils.c)  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
Hi,

Per Coverity.

make_ruledef function can dereference a NULL pointer (actions),
if "ev_qual" is provided and "actions" does not exist.

The comment there is contradictory: " /* these could be nulls */ "
Because if "ev_qual" is not null, "actions" cannot be either.

Solution proposed merely as a learning experience.

regards,
Ranier Vilela
Вложения

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

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Dereference before NULL check (src/backend/storage/ipc/latch.c)
Следующее
От: Noah Misch
Дата:
Сообщение: Re: public schema default ACL