Re: potential integer overflow in md.c

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: potential integer overflow in md.c
Date: 2007-04-04 16:52:46
Message-ID: 4613D7DE.4030403@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:
> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Oleg Bartunov 2007-04-06 17:45:27 Re: BUG #3048: pg_dump dumps intarray metadata incorrectly
Previous Message Tom Lane 2007-04-04 16:47:57 Re: potential integer overflow in md.c