Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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)

pgsql-committers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group