aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_files.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_dump/pg_backup_files.c')
-rw-r--r--src/bin/pg_dump/pg_backup_files.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bin/pg_dump/pg_backup_files.c b/src/bin/pg_dump/pg_backup_files.c
index b36a1c8600f..51fd64fa191 100644
--- a/src/bin/pg_dump/pg_backup_files.c
+++ b/src/bin/pg_dump/pg_backup_files.c
@@ -20,7 +20,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.27 2005/10/15 02:49:38 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.27.2.1 2007/08/06 01:38:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -397,9 +397,10 @@ _ReadByte(ArchiveHandle *AH)
lclContext *ctx = (lclContext *) AH->formatData;
int res;
- res = fgetc(AH->FH);
- if (res != EOF)
- ctx->filePos += 1;
+ res = getc(AH->FH);
+ if (res == EOF)
+ die_horribly(AH, modulename, "unexpected end of file\n");
+ ctx->filePos += 1;
return res;
}