Re: Out-of-bounds (src/backend/utils/misc/queryjumble.c)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Out-of-bounds (src/backend/utils/misc/queryjumble.c)
Дата
Msg-id 1652632.1624295959@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Out-of-bounds (src/backend/utils/misc/queryjumble.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers
Ranier Vilela <ranier.vf@gmail.com> writes:
> Per Coverity.
> 3 out-of-bounds at function AppendJumble.

> They have the face, smell and color of typo.
> And we usually increment the character count after a memcpy.

> Coverity no longer complained after the patch.

> Thoughts?

This patch is incorrect on its face, as you would know if you'd
spent even a couple minutes absorbing the comment in that function.

I wonder about Coverity here ... independently of whether the
hash-accumulation logic does what we want, it looks to me like
the proposed change doesn't so much remove a buffer overrun as
create one.  It would break the property jumble_len < JUMBLE_SIZE
that the subsequent lines rely on.

Please stop sending us random patches and expecting us to sort
out which ones are valid.  You're rapidly approaching the status
of "boy who cried wolf too many times".

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: disfavoring unparameterized nested loops
Следующее
От: Robert Haas
Дата:
Сообщение: Re: disfavoring unparameterized nested loops