Re: potential integer overflow in md.c

Поиск
Список
Период
Сортировка
От Zdenek Kotala
Тема Re: potential integer overflow in md.c
Дата
Msg-id 4613D7DE.4030403@sun.com
обсуждение исходный текст
Ответ на Re: potential integer overflow in md.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: potential integer overflow in md.c
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: BUG #3048: pg_dump dumps intarray metadata incorrectly