pgsql: Use StrNCpy not strncpy to fill hash key, to ensure the resulting - Mailing list pgsql-committers

From tgl@svr1.postgresql.org (Tom Lane)
Subject pgsql: Use StrNCpy not strncpy to fill hash key, to ensure the resulting
Date
Msg-id 20041203212701.E3E0B3A5445@svr1.postgresql.org
Whole thread Raw
List pgsql-committers
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)

pgsql-committers by date:

Previous
From: tgl@svr1.postgresql.org (Tom Lane)
Date:
Subject: pgsql: Use StrNCpy not strncpy to fill hash key, to ensure the resulting
Next
From: aglio@pgfoundry.org (User Aglio)
Date:
Subject: press - pr: New Directory