Content-Length: 274793 | pFad | http://github.com/postgrespro/postgres/commit/55d5ff825fae0ee9a1114a17fcd97a3e360a23b0

1E Fix detection of short tar files, broken by commit 14ea89366fe321609a… · postgrespro/postgres@55d5ff8 · GitHub
Skip to content

Commit 55d5ff8

Browse files
committed
Fix detection of short tar files, broken by commit 14ea893
Report by Noah Misch
1 parent 2e54d88 commit 55d5ff8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,10 +2034,13 @@ _discoverArchiveFormat(ArchiveHandle *AH)
20342034
exit_horribly(modulename, "input file appears to be a text format dump. Please use psql.\n");
20352035
}
20362036

2037-
if (AH->lookaheadLen != 512 && feof(fh))
2038-
exit_horribly(modulename, "input file does not appear to be a valid archive (too short?)\n");
2039-
else
2040-
READ_ERROR_EXIT(fh);
2037+
if (AH->lookaheadLen != 512)
2038+
{
2039+
if (feof(fh))
2040+
exit_horribly(modulename, "input file does not appear to be a valid archive (too short?)\n");
2041+
else
2042+
READ_ERROR_EXIT(fh);
2043+
}
20412044

20422045
if (!isValidTarHeader(AH->lookahead))
20432046
exit_horribly(modulename, "input file does not appear to be a valid archive\n");

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/55d5ff825fae0ee9a1114a17fcd97a3e360a23b0

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy