Explicit NULL dereference (src/backend/utils/adt/ruleutils.c) - Mailing list pgsql-hackers

From Ranier Vilela
Subject Explicit NULL dereference (src/backend/utils/adt/ruleutils.c)
Date
Msg-id CAEudQApoA=tMTic6xEPYP_hsNZ8XtToVThK_0x7D_aFQYowq3w@mail.gmail.com
Whole thread Raw
Responses Re: Explicit NULL dereference (src/backend/utils/adt/ruleutils.c)
List 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
Attachment

pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Dereference before NULL check (src/backend/storage/ipc/latch.c)
Next
From: Noah Misch
Date:
Subject: Re: public schema default ACL