blob: 1c93fda42807425394e75758c92e6c0a4b1dc30b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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);
}
|