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

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 8090616847daad2c3b5f322bb67a0a1eed3ddcd4
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2004-12-03T21:26:31Z
Releases: 8.0.0
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.

Files

PathChange+/−
src/backend/commands/prepare.c modified +3 −5