potential integer overflow in md.c

Поиск
Список
Период
Сортировка
От Zdenek Kotala
Тема potential integer overflow in md.c
Дата
Msg-id 4613D1D7.5060307@sun.com
обсуждение исходный текст
Ответы Re: potential integer overflow in md.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
I found following expression in md.c:

  seekpos = (long) (BLCKSZ * (blocknum % ((BlockNumber) RELSEG_SIZE)));

all variables and constants are int (32-bit) and long (also very often
32-bit). In case when somebody want to change RELSEG_SIZE to value
related to 4GB and bigger chunk he can expect data overwriting.

This seek problem is on more places, however in standard compilation
chunk size is 1GB and this problem does not appear.

I'm going to fix it.


        Zdenek

В списке pgsql-bugs по дате отправления:

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