From b7c1b7c2433a28e829159a56070a42665985dc36 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 27 Feb 2009 14:23:19 +0100 Subject: [PATCH] Use memcpy instead of strlcpy when copying interface names to static buffers. --- src/lldpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5