Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern use a bound string copy



details:   https://anonhg.NetBSD.org/src/rev/cfa13470d24f
branches:  trunk
changeset: 820785:cfa13470d24f
user:      maya <maya%NetBSD.org@localhost>
date:      Sun Jan 15 01:47:24 2017 +0000

description:
use a bound string copy

diffstat:

 sys/kern/kern_module_vfs.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ec657f7f8f24 -r cfa13470d24f sys/kern/kern_module_vfs.c
--- a/sys/kern/kern_module_vfs.c        Sun Jan 15 01:28:14 2017 +0000
+++ b/sys/kern/kern_module_vfs.c        Sun Jan 15 01:47:24 2017 +0000
@@ -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 @@
        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");



Home | Main Index | Thread Index | Old Index