Skip to content

Commit 4335c95

Browse files
committed
Fix improperly passed file descriptors
Fix for commit 14ea893 Report by Andres Freund
1 parent 0a78320 commit 4335c95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/pg_dump/pg_backup_tar.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -558,15 +558,15 @@ _tarReadRaw(ArchiveHandle *AH, void *buf, size_t len, TAR_MEMBER *th, FILE *fh)
558558
if (th->zFH)
559559
{
560560
res = GZREAD(&((char *) buf)[used], 1, len, th->zFH);
561-
if (res != len && !GZEOF(fh))
561+
if (res != len && !GZEOF(th->zFH))
562562
exit_horribly(modulename,
563563
"could not read from input file: %s\n", strerror(errno));
564564
}
565565
else
566566
{
567567
res = fread(&((char *) buf)[used], 1, len, th->nFH);
568-
if (res != len && !feof(fh))
569-
READ_ERROR_EXIT(fh);
568+
if (res != len && !feof(th->nFH))
569+
READ_ERROR_EXIT(th->nFH);
570570
}
571571
}
572572
else

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy