diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2018-10-11 14:10:03 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-10-11 14:10:03 +0200 |
commit | 6856f3e24fa00b99747bab790b478866212b2e2d (patch) | |
tree | ca2a4f818bb1844408f015aa2ebe32cdb8a9e3a1 /src/ipcpd/eth/eth.c | |
parent | 91299fe1de31465b0b389ba6fee76db23db830fb (diff) | |
parent | 9b8d2830250ecffb298f6c72196cffb94991f4d1 (diff) | |
download | ouroboros-6856f3e24fa00b99747bab790b478866212b2e2d.tar.gz ouroboros-6856f3e24fa00b99747bab790b478866212b2e2d.zip |
Merge branch 'testing' into be
Diffstat (limited to 'src/ipcpd/eth/eth.c')
-rw-r--r-- | src/ipcpd/eth/eth.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ipcpd/eth/eth.c b/src/ipcpd/eth/eth.c index 1bbfac5b..e7a1580c 100644 --- a/src/ipcpd/eth/eth.c +++ b/src/ipcpd/eth/eth.c @@ -1242,8 +1242,13 @@ static int eth_ipcp_bootstrap(const struct ipcp_config * conf) return -1; } + if (strlen(conf->dev) >= IFNAMSIZ) { + log_err("Invalid device name: %s.", conf->dev); + return -1; + } + memset(&ifr, 0, sizeof(ifr)); - memcpy(ifr.ifr_name, conf->dev, IFNAMSIZ); + strcpy(ifr.ifr_name, conf->dev); #ifdef BUILD_ETH_DIX if (conf->ethertype < 0x0600 || conf->ethertype == 0xFFFF) { |