projects
/
oweals
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fd9d45
)
Fix illegal memory access
author
Steven Barth
<steven@midlink.org>
Tue, 15 Oct 2013 15:18:20 +0000
(17:18 +0200)
committer
Steven Barth
<steven@midlink.org>
Tue, 15 Oct 2013 15:18:20 +0000
(17:18 +0200)
src/config.c
patch
|
blob
|
history
diff --git
a/src/config.c
b/src/config.c
index 7700c7eead4f8a977f22a9b5140a4d031b7b98bb..5d29173ed58895016581bb497326a0c9878d029d 100644
(file)
--- 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)