The following commit has been merged in the master branch: commit b61dc97b22fb0662332867fe53de84ca02064a4f Author: Stefan Sperling stsp@stsp.in-berlin.de Date: Wed Oct 11 22:41:12 2006 +0200
Replace call to strcpy with strncpy. Avoids compiler warning on OpenBSD.
diff --git a/posix.c b/posix.c index 0ce5cd6..c17d9c7 100644 --- a/posix.c +++ b/posix.c @@ -876,7 +876,7 @@ int main(int argc, char *argv[]) }
memset(&int_req, 0, sizeof (struct ifreq)); - strcpy(int_req.ifr_name, batman_if->dev); + strncpy(int_req.ifr_name, batman_if->dev, IFNAMSIZ - 1);
if (ioctl(batman_if->udp_recv_sock, SIOCGIFADDR, &int_req) < 0) {