]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Use memcpy instead of strlcpy when copying interface names to static
authorVincent Bernat <vbernat.ext@orange-ftgroup.com>
Fri, 27 Feb 2009 13:23:19 +0000 (14:23 +0100)
committerVincent Bernat <vbernat.ext@orange-ftgroup.com>
Fri, 27 Feb 2009 13:23:19 +0000 (14:23 +0100)
buffers.

src/lldpd.c

index 3b5468218a126f1977c7e34fc50409dc0b62619b..4ef4526399479279bb64504df17beba2cdca5bfc 100644 (file)
@@ -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;