Re: potential integer overflow in md.c - Mailing list pgsql-bugs

From Zdenek Kotala
Subject Re: potential integer overflow in md.c
Date
Msg-id 4613D7DE.4030403@sun.com
Whole thread Raw
In response to Re: potential integer overflow in md.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane wrote:
> Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:
>> I found following expression in md.c:
>>   seekpos = (long) (BLCKSZ * (blocknum % ((BlockNumber) RELSEG_SIZE)));
>
> There's no percentage in touching that code unless you intend to enable
> the non-segmented behavior; which will probably need more fixes than
> just this.

For non-segment code is following section:

  seekpos = (long) (BLCKSZ * (blocknum));

and FileSeek function also accept only 32bit offset.

        Zdenek

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: potential integer overflow in md.c
Next
From: Oleg Bartunov
Date:
Subject: Re: BUG #3048: pg_dump dumps intarray metadata incorrectly