Re: 回复: 回复: Fix potential overflow risks from wcscpy and sprintf

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 回复: 回复: Fix potential overflow risks from wcscpy and sprintf
Дата
Msg-id 658992.1750103214@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fix potential overflow risks from wcscpy and sprintf  (Peter Eisentraut <peter@eisentraut.org>)
Список pgsql-hackers
Yan Haibo <haibo.yan@hotmail.com> writes:
> Regarding the use of wcsncpy with LOCALE_NAME_MAX_LENGTH - 1, it is a precaution in case the input string is not
null-terminated.

I don't think it's a "precaution".  I think it's introducing a real
bug (that is, failure on a locale name of exactly the max allowed
length) to prevent a hypothetical bug.

            regards, tom lane



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