CID 1297229: Memory - illegal accesses (BUFFER_SIZE_WARNING)

This commit is contained in:
mlelstv 2015-05-09 11:53:34 +00:00
parent 2d86ca1420
commit 9803ba0320
1 changed files with 3 additions and 3 deletions

View File

@ -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 dev, int dtype)
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;
}