Re: strncpy is not a safe version of strcpy

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: strncpy is not a safe version of strcpy
Дата
Msg-id CAApHDvp2ApXtiRgHvpUG2RaKkp0kEjzq2PAs7=NfFJv3CMGesg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: strncpy is not a safe version of strcpy  (Noah Misch <noah@leadboat.com>)
Ответы Re: strncpy is not a safe version of strcpy  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
On Thu, Aug 14, 2014 at 4:13 PM, Noah Misch <noah@leadboat.com> wrote:
I share your (Kevin's) discomfort with our use of strlcpy().  I wouldn't mind
someone replacing most strlcpy()/snprintf() calls with calls to wrappers that
ereport(ERROR) on truncation.  Though as reliability problems go, this one has
been minor.


Or maybe it would be better to just remove the restriction and just palloc something of the correct size?
Although, that sounds like a much larger patch. I'd vote that the strlcpy should be used in the meantime.

Regards

David Rowley

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: [Bad Attachment] Re: jsonb format is pessimal for toast compression
Следующее
От: Tom Lane
Дата:
Сообщение: Re: jsonb format is pessimal for toast compression