Module Name:    src
Committed By:   maya
Date:           Sun Jan 15 01:47:24 UTC 2017

Modified Files:
        src/sys/kern: kern_module_vfs.c

Log Message:
use a bound string copy


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/kern/kern_module_vfs.c

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

Modified files:

Index: src/sys/kern/kern_module_vfs.c
diff -u src/sys/kern/kern_module_vfs.c:1.14 src/sys/kern/kern_module_vfs.c:1.15
--- src/sys/kern/kern_module_vfs.c:1.14	Tue Mar 15 02:59:24 2016
+++ src/sys/kern/kern_module_vfs.c	Sun Jan 15 01:47:24 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_module_vfs.c,v 1.14 2016/03/15 02:59:24 pgoyette Exp $	*/
+/*	$NetBSD: kern_module_vfs.c,v 1.15 2017/01/15 01:47:24 maya Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.14 2016/03/15 02:59:24 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.15 2017/01/15 01:47:24 maya Exp $");
 
 #define _MODULE_INTERNAL
 #include <sys/param.h>
@@ -162,7 +162,7 @@ module_load_plist_vfs(const char *modpat
 	base = NULL;
 
 	proppath = PNBUF_GET();
-	strcpy(proppath, modpath);
+	strlcpy(proppath, modpath, MAXPATHLEN);
 	pathlen = strlen(proppath);
 	if ((pathlen >= 6) && (strcmp(&proppath[pathlen - 5], ".kmod") == 0)) {
 		strcpy(&proppath[pathlen - 5], ".plist");

Reply via email to