Skip to content

Commit 9a4ef0c

Browse files
committed
Fix ReadOffset() to work correctly when off_t is wider than int.
1 parent 82b4dd3 commit 9a4ef0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.81 2003/12/06 03:00:11 tgl Exp $
18+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.82 2004/01/04 04:02:15 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -1291,7 +1291,7 @@ ReadOffset(ArchiveHandle *AH, off_t *o)
12911291
for (off = 0; off < AH->offSize; off++)
12921292
{
12931293
if (off < sizeof(off_t))
1294-
*o |= ((*AH->ReadBytePtr) (AH)) << (off * 8);
1294+
*o |= ((off_t) ((*AH->ReadBytePtr) (AH))) << (off * 8);
12951295
else
12961296
{
12971297
if ((*AH->ReadBytePtr) (AH) != 0)

0 commit comments

Comments
 (0)