Re: [PATCH] Fix buffer not null terminated on (ecpg lib)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Fix buffer not null terminated on (ecpg lib)
Дата
Msg-id 429384.1623779588@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] Fix buffer not null terminated on (ecpg lib)  (Andres Freund <andres@anarazel.de>)
Ответы Re: [PATCH] Fix buffer not null terminated on (ecpg lib)  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2021-06-15 07:40:46 -0300, Ranier Vilela wrote:
>> memcpy would not suffer from it?

> It'd not be correct for short sqlstates - you'd read beyond the end of
> the source buffer. There are cases of it in the ecpg code.

What's a "short SQLSTATE"?  They're all five characters by definition.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: unnesting multirange data types
Следующее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: unnesting multirange data types