diff options
author | Jilles Tjoelker <jilles@irssi.org> | 2009-05-15 11:54:33 +0000 |
---|---|---|
committer | jilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2009-05-15 11:54:33 +0000 |
commit | 1f9c560a7408bf5550e030b5ac0c07dad5435eb1 (patch) | |
tree | d20045ad4d79efe4f05ef584157b61d27f90736e /src/fe-common/irc | |
parent | 6aa167e5ac748b84c8a544c32f9c76c7ad597a71 (diff) | |
download | irssi-1f9c560a7408bf5550e030b5ac0c07dad5435eb1.zip |
Fix out of bounds access in event_wallops().
bug #662
Submitted by: nemo
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5068 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc')
-rw-r--r-- | src/fe-common/irc/fe-events.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fe-common/irc/fe-events.c b/src/fe-common/irc/fe-events.c index f834f8af..a6fd8599 100644 --- a/src/fe-common/irc/fe-events.c +++ b/src/fe-common/irc/fe-events.c @@ -298,7 +298,7 @@ static void event_wallops(IRC_SERVER_REC *server, const char *data, const char * 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); } |