Bufmgr possible overflow

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Bufmgr possible overflow
Дата
Msg-id CAEudQAr_oWHpZk4uumZijYS362gp4KHAah-yUe08CQY4a4SsOQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Bufmgr possible overflow  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
Hi,

IMO I think that commit 31966b1 has an oversight.

All the logic of the changes are based on the "extend_by" variable, which is a uint32, but in some places it is using "int", which can lead to an overflow at some point.

I also take the opportunity to correct another oversight, regarding the commit dad50f6,
for possible duplicate assignment.
GetLocalBufferDescriptor was called twice.

Taking advantage of this, I promoted a scope reduction for some variables, which I thought was opportune.

Patch attached.

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

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: v12: ERROR: subplan "InitPlan 2 (returns $4)" was not initialized
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Direct I/O