File irssi-0.8.x_wallop_off_by_one.patch of Package irssi

Index: src/fe-common/irc/fe-events.c
===================================================================
--- src/fe-common/irc/fe-events.c	(revision 5067)
+++ 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);
 	}
openSUSE Build Service is sponsored by