pgsql: Silence Coverity complaint about possible null-pointer dereferen

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Silence Coverity complaint about possible null-pointer dereferen
Date: 2024-05-05 15:24:18
Message-ID: E1s3dir-001fKz-AR@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Silence Coverity complaint about possible null-pointer dereference.

If pg_init_privs were to contain a NULL ACL field, this code would
pass old_acl == NULL to merge_acl_with_grant, which would crash.
The case shouldn't happen, but it just takes a couple more lines
of code to guard against it, so do so.

Oversight in 534287403; no back-patch needed.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/713cfaf2a576a9896fdd9b5aad51f6ebeb91a3c7

Modified Files
--------------
src/backend/catalog/aclchk.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2024-05-05 17:31:33 pgsql: Release notes for 16.3, 15.7, 14.12, 13.15, 12.19.
Previous Message Daniel Gustafsson 2024-05-05 08:25:56 pgsql: Fix comment regarding LibreSSL availability