mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
fix use after free receiving caps
fixes GL#34
This commit is contained in:
parent
3f0afa91f3
commit
5a4e7ab659
@ -169,7 +169,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
||||
* duplicated values, let's just warn the user */
|
||||
g_warning("The server sent the %s capability twice", key);
|
||||
}
|
||||
g_hash_table_insert(server->cap_supported, key, val);
|
||||
g_hash_table_replace(server->cap_supported, key, val);
|
||||
}
|
||||
|
||||
/* A multiline response is always terminated by a normal one,
|
||||
@ -255,7 +255,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
||||
continue;
|
||||
}
|
||||
|
||||
g_hash_table_insert(server->cap_supported, key, val);
|
||||
g_hash_table_replace(server->cap_supported, key, val);
|
||||
cap_emit_signal(server, "new", key);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user