BUG #18787: pointer te->defn not checked for NULL
От | PG Bug reporting form |
---|---|
Тема | BUG #18787: pointer te->defn not checked for NULL |
Дата | |
Msg-id | 18787-676496fef9742cab@postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #18787: pointer te->defn not checked for NULL
|
Список | pgsql-bugs |
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 --- 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) {
В списке pgsql-bugs по дате отправления: