Ineffective Assert-check in CopyMultiInsertInfoNextFreeSlot()

Amul Sul <sulamul@gmail.com>

From: Amul Sul <sulamul@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2024-08-16T11:47:47Z
Lists: pgsql-hackers

Attachments

Hi,

The Assert(buffer != NULL) is placed after the buffer is accessed,
which could lead to a segmentation fault before the check is executed.

Attached a small patch to correct that.

--
Regards,
Amul Sul
EDB: http://www.enterprisedb.com

Commits

  1. Relocate a badly placed Assert in COPY FROM code