| От | Tom Lane |
|---|---|
| Тема | Re: strncpy is not a safe version of strcpy |
| Дата | |
| Msg-id | 22522.1384529118@sss.pgh.pa.us обсуждение |
| Ответ на | Re: strncpy is not a safe version of strcpy (Andres Freund <andres@2ndquadrant.com>) |
| Ответы |
Re: strncpy is not a safe version of strcpy
|
| Список | pgsql-hackers |
Andres Freund <andres@2ndquadrant.com> writes:
> I didn't argue against s/strncpy/strlcpy/. That's clearly a sensible
> fix.
> I am arguing about introducing additional code and error messages about
> it, that need to be translated. And starting doing so in isolationtester
> of all places.
I agree with Andres on this. Commit
7cb964acb794078ef033cbf2e3a0e7670c8992a9 is the very definition of
overkill, and I don't want to see us starting to plaster the source
code with things like this. Converting strncpy to strlcpy seems
appropriate --- and sufficient.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера