aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_backup_tar.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c
index b4f59429592..c601ec07012 100644
--- a/src/bin/pg_dump/pg_backup_tar.c
+++ b/src/bin/pg_dump/pg_backup_tar.c
@@ -1082,11 +1082,13 @@ _tarAddFile(ArchiveHandle *AH, TAR_MEMBER *th)
/*
* Find file len & go back to start.
*/
- fseeko(tmp, 0, SEEK_END);
+ if (fseeko(tmp, 0, SEEK_END) != 0)
+ fatal("error during file seek: %m");
th->fileLen = ftello(tmp);
if (th->fileLen < 0)
fatal("could not determine seek position in archive file: %m");
- fseeko(tmp, 0, SEEK_SET);
+ if (fseeko(tmp, 0, SEEK_SET) != 0)
+ fatal("error during file seek: %m");
_tarWriteHeader(th);