From: Vincent Bernat Date: Fri, 27 Feb 2009 13:23:19 +0000 (+0100) Subject: Use memcpy instead of strlcpy when copying interface names to static X-Git-Tag: 0.3.1~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b7c1b7c2433a28e829159a56070a42665985dc36;p=thirdparty%2Flldpd.git Use memcpy instead of strlcpy when copying interface names to static buffers. --- diff --git a/src/lldpd.c b/src/lldpd.c index 3b546821..4ef45263 100644 --- a/src/lldpd.c +++ b/src/lldpd.c @@ -314,7 +314,7 @@ lldpd_iface_close(struct lldpd *global, struct lldpd_hardware *hardware) close(hardware->h_raw_real); lldpd_iface_multicast(global, listen, 1); } - strlcpy(listen, hardware->h_ifname, sizeof(listen)); + memcpy(listen, hardware->h_ifname, IFNAMSIZ); lldpd_iface_multicast(global, listen, 1); hardware->h_raw_real = -1;