pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Silence Coverity complaint about possible null-pointer dereferen
Date: Sun, 05 May 2024 15:24:18 +0000
Message-ID: <E1s3dir-001fKz-AR@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1s3dir-001fKz-AR@gemulon.postgresql.org>
Permalink:  ../E1s3dir-001fKz-AR@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1s3dir-001fKz-AR@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Silence Coverity complaint about possible null-pointer dereferen
  In-Reply-To: <E1s3dir-001fKz-AR@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox