From: David van Moolenbroek Date: Fri, 27 Jul 2012 14:55:10 +0000 (+0000) Subject: libbdev: resolve Coverity warnings X-Git-Tag: v3.2.1~423 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=55c3f4800e1e2cd8c70fa5682731660c95bc7e7e;p=minix.git libbdev: resolve Coverity warnings --- diff --git a/lib/libbdev/driver.c b/lib/libbdev/driver.c index efe2fa2a2..6c0a3deae 100644 --- a/lib/libbdev/driver.c +++ b/lib/libbdev/driver.c @@ -51,7 +51,7 @@ endpoint_t bdev_driver_set(dev_t dev, char *label) assert(major >= 0 && major < NR_DEVICES); assert(strlen(label) < sizeof(driver_tab[major].label)); - strcpy(driver_tab[major].label, label); + strlcpy(driver_tab[major].label, label, sizeof(driver_tab[major].label)); driver_tab[major].endpt = NONE;