+Sun Jan 27 21:04:19 EET 2002 Pekka Riikonen <priikone@silcnet.org>
+
+ * Check for NULL socket pointer in the function
+ silc_server_packet_send_to_channel_real. Affected file
+ silcd/packet_send.c.
+
+ * Fixed the BAN notify handling to correctly remove ban
+ list. Affected file silcd/packet_receive.c.
+
Sat Jan 26 23:01:03 EET 2002 Pekka Riikonen <priikone@silcnet.org>
* Fixed some header addition to Toolkit distribution in
}
/* Get entry to the channel user list */
- silc_hash_table_find(channel->user_list, client, NULL, (void *)&chl);
+ if (!silc_hash_table_find(channel->user_list, client, NULL, (void *)&chl)) {
+ silc_server_command_send_status_reply(cmd, SILC_COMMAND_BAN,
+ SILC_STATUS_ERR_NOT_ON_CHANNEL);
+ goto out;
+ }
/* The client must be at least channel operator. */
if (!(chl->mode & SILC_CHANNEL_UMODE_CHANOP)) {
2, id, id_len,
3, channel->ban_list,
channel->ban_list ?
- strlen(channel->ban_list) - 1 : 0);
+ strlen(channel->ban_list) : 0);
silc_server_packet_send(server, cmd->sock, SILC_PACKET_COMMAND_REPLY, 0,
packet->data, packet->len, FALSE);
if (tmp && channel->ban_list) {
char *start, *end, *n;
- if (!strcmp(channel->ban_list, tmp)) {
+ if (!strncmp(channel->ban_list, tmp, strlen(channel->ban_list) - 1)) {
silc_free(channel->ban_list);
channel->ban_list = NULL;
} else {