projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a78320
)
Fix improperly passed file descriptors
author
Bruce Momjian
<bruce@momjian.us>
Tue, 6 May 2014 16:20:51 +0000
(12:20 -0400)
committer
Bruce Momjian
<bruce@momjian.us>
Tue, 6 May 2014 16:20:51 +0000
(12:20 -0400)
Fix for commit
14ea89366fe321609afc5838ff9fe2ded1cd707d
Report by Andres Freund
src/bin/pg_dump/pg_backup_tar.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/pg_dump/pg_backup_tar.c
b/src/bin/pg_dump/pg_backup_tar.c
index 0cb72650b01b75ff4772828c7ecf532b7584a07a..aa06503fb04cfaba5e37b458d4782e9912e77136 100644
(file)
--- a/
src/bin/pg_dump/pg_backup_tar.c
+++ b/
src/bin/pg_dump/pg_backup_tar.c
@@
-558,15
+558,15
@@
_tarReadRaw(ArchiveHandle *AH, void *buf, size_t len, TAR_MEMBER *th, FILE *fh)
if (th->zFH)
{
res = GZREAD(&((char *) buf)[used], 1, len, th->zFH);
- if (res != len && !GZEOF(
fh
))
+ if (res != len && !GZEOF(
th->zFH
))
exit_horribly(modulename,
"could not read from input file: %s\n", strerror(errno));
}
else
{
res = fread(&((char *) buf)[used], 1, len, th->nFH);
- if (res != len && !feof(
fh
))
- READ_ERROR_EXIT(
fh
);
+ if (res != len && !feof(
th->nFH
))
+ READ_ERROR_EXIT(
th->nFH
);
}
}
else