Thread: 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

From
tgl@svr1.postgresql.org (Tom Lane)
Date:
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.

Tags:
----
REL7_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/commands:
        prepare.c (r1.23 -> r1.23.4.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/prepare.c.diff?r1=1.23&r2=1.23.4.1)