pgsql: Use safe string copy routine

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема pgsql: Use safe string copy routine
Дата
Msg-id E1sOZlu-00017D-FL@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Use safe string copy routine

Using memcpy with strlen as the size parameter will not take the
NULL terminator into account, relying instead on the destination
buffer being properly initialized. Replace with strlcpy which is
a safer alternative, and more in line with how we handle copying
strings elsewhere.

Author: Ranier Vilela <ranier.vf@gmail.com>
Discussion: https://postgr.es/m/CAEudQApAsbLsQ+gGiw-hT+JwGhgogFa_=5NUkgFO6kOPxyNidQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e930c872b65c19c8950556fa94aa9ab53b2919b0

Modified Files
--------------
src/backend/access/transam/xlog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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