Avoid a possible overflow (src/backend/utils/sort/logtape.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Avoid a possible overflow (src/backend/utils/sort/logtape.c)
Дата
Msg-id CAEudQApLDWCBR_xmwNjGBrDo+f+S4E87x3s7-+hoaKqYdtC4JQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Avoid a possible overflow (src/backend/utils/sort/logtape.c)  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi,

nFreeBlocks stores the number of free blocks and
your type is *long*.

At Function ltsGetFreeBlock is locally stored in
heapsize wich type is *int*

With Windows both *long* and *int* are 4 bytes.
But with Linux *long* is 8 bytes and *int* are 4 bytes.

patch attached.

best regards,
Ranier Vilela
Вложения

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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: add timing information to pg_upgrade
Следующее
От: "Tristan Partin"
Дата:
Сообщение: Re: Make documentation builds reproducible