Module Name:    src
Committed By:   christos
Date:           Tue Oct  8 19:38:27 UTC 2019

Modified Files:
        src/lib/libisns: isns.c

Log Message:
use strlcpy (the buffer is already zeroed)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/lib/libisns/isns.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libisns/isns.c
diff -u src/lib/libisns/isns.c:1.1.1.1 src/lib/libisns/isns.c:1.2
--- src/lib/libisns/isns.c:1.1.1.1	Sat Jan 15 20:22:50 2011
+++ src/lib/libisns/isns.c	Tue Oct  8 15:38:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: isns.c,v 1.1.1.1 2011/01/16 01:22:50 agc Exp $	*/
+/*	$NetBSD: isns.c,v 1.2 2019/10/08 19:38:27 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004,2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: isns.c,v 1.1.1.1 2011/01/16 01:22:50 agc Exp $");
+__RCSID("$NetBSD: isns.c,v 1.2 2019/10/08 19:38:27 christos Exp $");
 
 /*
  * isns.c
@@ -153,7 +153,7 @@ isns_add_servercon(ISNS_HANDLE isns_hand
 			return ENOMEM;
 		}
 		memset(ai_p->ai_canonname, '\0', len + 1);
-		strncpy(ai_p->ai_canonname, ai->ai_canonname, len);
+		strlcpy(ai_p->ai_canonname, ai->ai_canonname, len + 1);
 	} else
 		ai_p->ai_canonname = NULL;
 	if (ai->ai_addr != NULL) { 

Reply via email to