From 16059d39a04f5307e9b4dade10e70e5a4939a6db Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 7 Feb 2007 00:52:35 +0000 Subject: Replace some strncpy() by strlcpy(). --- contrib/dblink/dblink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/dblink/dblink.c') diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c index f4c06624060..568ac1e5f73 100644 --- a/contrib/dblink/dblink.c +++ b/contrib/dblink/dblink.c @@ -8,7 +8,7 @@ * Darko Prenosil * Shridhar Daithankar * - * $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.61 2007/01/05 22:19:17 momjian Exp $ + * $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.62 2007/02/07 00:52:35 petere Exp $ * Copyright (c) 2001-2007, PostgreSQL Global Development Group * ALL RIGHTS RESERVED; * @@ -2248,7 +2248,7 @@ createNewConnection(const char *name, remoteConn * rconn) errmsg("duplicate connection name"))); hentry->rconn = rconn; - strncpy(hentry->name, name, NAMEDATALEN - 1); + strlcpy(hentry->name, name, sizeof(hentry->name)); } static void -- cgit v1.2.3