Unsafe use of strncpy replaced by strlcpy. CID 2256.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40629 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
117711e680
commit
d1a78f51e0
@ -581,7 +581,7 @@ pcap_lookupnet(device, netp, maskp, errbuf)
|
||||
/* XXX Work around Linux kernel bug */
|
||||
ifr.ifr_addr.sa_family = AF_INET;
|
||||
#endif
|
||||
(void)strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));
|
||||
(void)strlcpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));
|
||||
if (ioctl(fd, SIOCGIFADDR, (char *)&ifr) < 0) {
|
||||
if (errno == EADDRNOTAVAIL) {
|
||||
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
||||
|
Loading…
Reference in New Issue
Block a user