# HG changeset patch # User tron # Date 1150288231 0 # Node ID a2dfcfd71652b918dd1d68484cf03edc268f6007 # Parent 31b1ef879013357e1bcb3812bd3ab63ca665202b (svn r5264) -Fix: The wrong IP could get unbanned, e.g. 'unban 1.2.3.42' could result in unbanning 1.2.3.4 diff --git a/console_cmds.c b/console_cmds.c --- a/console_cmds.c +++ b/console_cmds.c @@ -440,7 +440,7 @@ for (i = 0; i < lengthof(_network_ban_list); i++) { if (_network_ban_list[i] == NULL) continue; - if (strncmp(_network_ban_list[i], argv[1], strlen(_network_ban_list[i])) == 0 || index == i) { + if (strcmp(_network_ban_list[i], argv[1]) == 0 || index == i) { free(_network_ban_list[i]); _network_ban_list[i] = NULL; IConsolePrint(_icolour_def, "IP unbanned.");