Avoid NULL dereference when leaving a channel with a private key.
authorKp <kp@valhallalegends.com>
Fri, 25 Apr 2008 03:18:27 +0000 (22:18 -0500)
committerKp <kp@valhallalegends.com>
Mon, 1 Sep 2008 19:51:50 +0000 (14:51 -0500)
Split out a patch from Skywing <skywing@valhallalegends.com> to fix a
NULL pointer dereference when the client leaves a +k channel and the
local user had set a key for the channel.

lib/silcclient/client_channel.c

index 32dac87..4120695 100644 (file)
@@ -630,7 +630,7 @@ SilcBool silc_client_del_channel_private_keys(SilcClient client,
     channel->cipher = silc_cipher_get_name(channel->internal.send_key);
   else
     channel->cipher = NULL;
-  if (channel->hmac)
+  if (channel->internal.hmac)
     channel->hmac = silc_hmac_get_name(channel->internal.hmac);
   else
     channel->hmac = NULL;