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

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use StrNCpy not strncpy to fill hash key, to ensure the resulting
Date: 2004-12-03 21:27:01
Message-ID: 20041203212701.E3E0B3A5445@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

Browse pgsql-committers by date

  From Date Subject
Next Message User Aglio 2004-12-03 21:49:19 press - pr: New Directory
Previous Message Tom Lane 2004-12-03 21:26:36 pgsql: Use StrNCpy not strncpy to fill hash key, to ensure the resulting