diff options
Diffstat (limited to 'src/bin/pg_dump/pg_backup_files.c')
-rw-r--r-- | src/bin/pg_dump/pg_backup_files.c | 9 |
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 38046a026ef..e87857c9bc5 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.29.2.1 2007/02/19 15:05:21 mha Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.29.2.2 2007/08/06 01:38:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -396,9 +396,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; } |