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 20041203212636.668413A58DD@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.

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)

pgsql-committers by date:

Previous
From: petere@svr1.postgresql.org (Peter Eisentraut)
Date:
Subject: pgsql: Translation fix by Julien Cristau
Next
From: tgl@svr1.postgresql.org (Tom Lane)
Date:
Subject: pgsql: Use StrNCpy not strncpy to fill hash key, to ensure the resulting