updates.
[silc.git] / lib / silcclient / client_prvmsg.c
index 450fb40537b3e7a5cf910c99c1b9ad116cf25c83..7f672bde4621b04ca5dd1c56ba24c1faa06fdbbd 100644 (file)
@@ -21,7 +21,8 @@
 /* This file includes the private message sending and receiving routines
    and private message key handling routines. */
 
-#include "clientlibincludes.h"
+#include "silcincludes.h"
+#include "silcclient.h"
 #include "client_internal.h"
 
 /* Sends private message to remote client. If private message key has
@@ -344,8 +345,7 @@ int silc_client_add_private_message_key(SilcClient client,
   }
 
   /* Save the key */
-  client_entry->key = silc_calloc(key_len, sizeof(*client_entry->key));
-  memcpy(client_entry->key, key, key_len);
+  client_entry->key = silc_memdup(key, key_len);
   client_entry->key_len = key_len;
 
   /* Produce the key material as the protocol defines */