Module Name: src Committed By: mlelstv Date: Sat May 9 11:53:34 UTC 2015
Modified Files: src/sys/dev: dksubr.c Log Message: CID 1297229: Memory - illegal accesses (BUFFER_SIZE_WARNING) To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/dev/dksubr.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/dev/dksubr.c diff -u src/sys/dev/dksubr.c:1.61 src/sys/dev/dksubr.c:1.62 --- src/sys/dev/dksubr.c:1.61 Tue May 5 21:52:10 2015 +++ src/sys/dev/dksubr.c Sat May 9 11:53:34 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: dksubr.c,v 1.61 2015/05/05 21:52:10 mlelstv Exp $ */ +/* $NetBSD: dksubr.c,v 1.62 2015/05/09 11:53:34 mlelstv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.61 2015/05/05 21:52:10 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.62 2015/05/09 11:53:34 mlelstv Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -82,7 +82,7 @@ dk_init(struct dk_softc *dksc, device_t dksc->sc_dtype = dtype; dksc->sc_dev = dev; - strncpy(dksc->sc_xname, device_xname(dev), DK_XNAME_SIZE); + strlcpy(dksc->sc_xname, device_xname(dev), DK_XNAME_SIZE); dksc->sc_dkdev.dk_name = dksc->sc_xname; }