Commit 1f2c75dc authored by Jiri Popelka's avatar Jiri Popelka

nameif crash for long interface names (RHBZ #209120)

I'm not sure how to reproduce that, but the patch
is quite straightforward.
parent cf337801
......@@ -99,8 +99,8 @@ int setname(char *oldname, char *newname)
struct ifreq ifr;
opensock();
memset(&ifr,0,sizeof(struct ifreq));
strcpy(ifr.ifr_name, oldname);
strcpy(ifr.ifr_newname, newname);
strncpy(ifr.ifr_name, oldname, IFNAMSIZ);
strncpy(ifr.ifr_newname, newname, IFNAMSIZ);
return ioctl(ctl_sk, SIOCSIFNAME, &ifr);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment