Обсуждение: pgsql: Use StrNCpy not strncpy to fill hash key, to ensure the resulting

Поиск
Список
Период
Сортировка

pgsql: Use StrNCpy not strncpy to fill hash key, to ensure the resulting

От
tgl@svr1.postgresql.org (Tom Lane)
Дата:
Log Message:
-----------
Use StrNCpy not strncpy to fill hash key, to ensure the resulting key
is null-terminated.  I think this is not a real bug because the parser
would always have truncated the identifier to NAMEDATALEN-1 already,
but let's be safe.  Per report from Klocwork.

Modified Files:
--------------
    pgsql/src/backend/commands:
        prepare.c (r1.33 -> r1.34)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/prepare.c.diff?r1=1.33&r2=1.34)