From: Steven Barth Date: Tue, 15 Oct 2013 15:18:20 +0000 (+0200) Subject: Fix illegal memory access X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=491200f3ffae5c9599124e0b2eccbdf566de4cf4;p=oweals%2Fodhcpd.git Fix illegal memory access --- diff --git a/src/config.c b/src/config.c index 7700c7e..5d29173 100644 --- a/src/config.c +++ b/src/config.c @@ -287,7 +287,9 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr if (!iface->ifname[0] && !ifname) return -1; - strncpy(iface->ifname, ifname, sizeof(iface->ifname) - 1); + if (ifname) + strncpy(iface->ifname, ifname, sizeof(iface->ifname) - 1); + iface->inuse = true; if (overwrite)