pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18787: pointer te->defn not checked for NULL
2+ messages / 2 participants
[nested] [flat]
* BUG #18787: pointer te->defn not checked for NULL
@ 2025-01-28 14:32 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2025-01-28 14:32 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: dan-eli@mail.ru
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)
{
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #18787: pointer te->defn not checked for NULL
@ 2025-01-28 15:00 Tom Lane <tgl@sss.pgh.pa.us>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2025-01-28 15:00 UTC (permalink / raw)
To: dan-eli@mail.ru; +Cc: pgsql-bugs@lists.postgresql.org
PG Bug reporting form <noreply@postgresql.org> writes:
> Here is a patch fixing the issue. I think that NULL check is needed here
In none of these three bug reports have you given an actual
bug report --- that is, there is no reason to believe that
these patches fix any reachable failure case. If you have
examples showing that the cases are reachable, please
provide those first, and then we can discuss suitable fixes.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-01-28 15:00 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-01-28 14:32 BUG #18787: pointer te->defn not checked for NULL PG Bug reporting form <noreply@postgresql.org>
2025-01-28 15:00 ` Tom Lane <tgl@sss.pgh.pa.us>
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