tags 392263 +patch +fixed thanks I just commited the following patch into net-tools hed CVS on net-tools.berlios.de:
--- ipmaddr.c 8 Apr 2001 17:05:05 -0000 1.8 +++ ipmaddr.c 11 Oct 2006 01:10:05 -0000 @@ -291,13 +291,15 @@ static int multiaddr_list(int argc, char **argv) { struct ma_info *list = NULL; + size_t l; while (argc > 0) { if (strcmp(*argv, "dev") == 0) { NEXT_ARG(); - if (filter_dev[0]) + l = strlen(*argv); + if (l <= 0 || l >= sizeof(filter_dev)) usage(); - strcpy(filter_dev, *argv); + strncpy(filter_dev, *argv, sizeof (filter_dev)); } else if (strcmp(*argv, "all") == 0) { filter_family = AF_UNSPEC; } else if (strcmp(*argv, "ipv4") == 0) { @@ -307,9 +309,10 @@ } else if (strcmp(*argv, "link") == 0) { filter_family = AF_PACKET; } else { - if (filter_dev[0]) + l = strlen(*argv); + if (l <= 0 || l >= sizeof(filter_dev)) usage(); - strcpy(filter_dev, *argv); + strncpy(filter_dev, *argv, sizeof (filter_dev)); } argv++; argc--; } this also fixes the missuse of "if (filter_dev[0])" -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]