Explicit NULL dereference (src/backend/utils/adt/ruleutils.c)
Ranier Vilela <ranier.vf@gmail.com>
From: Ranier Vilela <ranier.vf@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-10-31T14:49:07Z
Lists: pgsql-hackers
Attachments
- fix_explicit_null_dereference_ruleutils.patch (application/octet-stream) patch
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
Commits
-
Remove special checks for pg_rewrite.ev_qual and ev_action being NULL.
- e1339bfc7a2f 14.0 landed