r5068 | jilles | 2009-05-15 11:54:33 +0000 (Fri, 15 May 2009) | 5 lines Fix out of bounds access in event_wallops(). bug #662 Submitted by: nemo Index: irssi/src/fe-common/irc/fe-events.c =================================================================== --- irssi/src/fe-common/irc/fe-events.c (revision 5067) +++ irssi/src/fe-common/irc/fe-events.c (revision 5068) @@ -298,7 +298,7 @@ tmp = g_strdup(data+8); len = strlen(tmp); - if (tmp[len-1] == 1) tmp[len-1] = '\0'; + if (len >= 1 && tmp[len-1] == 1) tmp[len-1] = '\0'; printformat(server, NULL, MSGLEVEL_WALLOPS, IRCTXT_ACTION_WALLOPS, nick, tmp); g_free(tmp); }