From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <drowley@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix list_copy_head() with empty Lists
Date: Thu, 20 Apr 2023 09:28:29 -0400
Message-ID: <3129478.1681997309@sss.pgh.pa.us> (raw)
In-Reply-To: <E1ppGOE-003u13-4o@gemulon.postgresql.org>
References: <E1ppGOE-003u13-4o@gemulon.postgresql.org>
David Rowley <drowley@postgresql.org> writes:
> Fix list_copy_head() with empty Lists
> list_copy_head() given an empty List would crash from trying to
> dereference the List to obtain its length. Since NIL is how we represent
> an empty List, we should just be returning another empty List in this
> case.
I see that list_copy_head exists in v15 as well. It appears to have
no callers there, but we'd better fix it anyway in case somebody
back-patches a fix that uses it.
Or, maybe, remove it in 15?
regards, tom lane
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, drowley@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix list_copy_head() with empty Lists
In-Reply-To: <3129478.1681997309@sss.pgh.pa.us>
* 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