Fix buffer overlow (caught by FORTIFY_SOURCE) when too long device name is specified as command line argument. https://bugzilla.redhat.com/show_bug.cgi?id=641704 --- macchanger-1.5.0/src/netinfo.c.orig 2010-10-11 18:06:48.000000000 +0200 +++ macchanger-1.5.0/src/netinfo.c 2010-10-11 18:11:42.000000000 +0200 @@ -44,7 +44,8 @@ mc_net_info_new (const char *device) return NULL; } - strcpy (new->dev.ifr_name, device); + strncpy (new->dev.ifr_name, device, sizeof(new->dev.ifr_name)); + new->dev.ifr_name[sizeof(new->dev.ifr_name)-1] = '\0'; if (ioctl(new->sock, SIOCGIFHWADDR, &new->dev) < 0) { perror ("set device name"); free(new);