Use StrNCpy not strncpy to fill hash key, to ensure the resulting key
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 3 Dec 2004 21:26:52 +0000 (21:26 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 3 Dec 2004 21:26:52 +0000 (21:26 +0000)
commitcc565122967e7ab2400a84e8477724f6e77272ba
tree646623a28ebff955dd7c8fe14c558e3dcf5912de
parentdb6551add5aafa4ab35c75c33a5cd4d40043649f
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.
src/backend/commands/prepare.c