mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Fix ReadOffset() to work correctly when off_t is wider than int.
This commit is contained in:
parent
82b4dd394f
commit
9a4ef0c562
@ -15,7 +15,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.81 2003/12/06 03:00:11 tgl Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.82 2004/01/04 04:02:15 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1291,7 +1291,7 @@ ReadOffset(ArchiveHandle *AH, off_t *o)
|
|||||||
for (off = 0; off < AH->offSize; off++)
|
for (off = 0; off < AH->offSize; off++)
|
||||||
{
|
{
|
||||||
if (off < sizeof(off_t))
|
if (off < sizeof(off_t))
|
||||||
*o |= ((*AH->ReadBytePtr) (AH)) << (off * 8);
|
*o |= ((off_t) ((*AH->ReadBytePtr) (AH))) << (off * 8);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((*AH->ReadBytePtr) (AH) != 0)
|
if ((*AH->ReadBytePtr) (AH) != 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user