pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: dan-eli@mail.ru
Subject: BUG #18787: pointer te->defn not checked for NULL
Date: Tue, 28 Jan 2025 14:32:06 +0000
Message-ID: <18787-676496fef9742cab@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      18787
Logged by:          Daniel Elishakov
Email address:      dan-eli@mail.ru
PostgreSQL version: 16.6
Operating system:   ubuntu 20.04
Description:        

Here is a patch fixing the issue. I think that NULL check is needed here
diff --git a/src/bin/pg_dump/pg_backup_archiver.c
b/src/bin/pg_dump/pg_backup_archiver.c
index 958f88d420..ebb7eca43c 100644
inline patch 1: src/bin/pg_dump/pg_backup_archiver.c (+0/-0 lines) download inline-1.patch--- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -3654,7 +3654,7 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, bool
isData) if (!ropt->noOwner && (!ropt->use_setsessauth || (strcmp(te->desc, "SCHEMA") == 0 && - strncmp(te->defn, "--", 2) == 0)) && + (te->defn && strncmp(te->defn, "--", 2) == 0))) && te->owner && strlen(te->owner) > 0 && te->dropStmt && strlen(te->dropStmt) > 0) {

view thread (2+ messages)  latest in thread

Message-ID: <18787-676496fef9742cab@postgresql.org>
Permalink:  ../18787-676496fef9742cab@postgresql.org/
Also on:    postgresql.org/message-id/18787-676496fef9742cab@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-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, dan-eli@mail.ru
  Subject: Re: BUG #18787: pointer te->defn not checked for NULL
  In-Reply-To: <18787-676496fef9742cab@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