Client: Fix signature verification double free
[silc.git] / apps / irssi / src / silc / core / client_ops.c
index 16feddc7583a8b2c18dd200f736473b2a8ba6d92..a4d53b76504b981fcbf7a0a197225d8d4e2f0c2a 100644 (file)
@@ -262,10 +262,11 @@ int verify_message_signature(SilcClientEntry sender,
                                      sizeof(sender->fingerprint));
       if (strcmp(fingerprint, fingerprint2)) {
         /* since the public key differs from the senders public key, the
-           verification _failed_ */
+           verification won't be done */
         silc_pkcs_public_key_free(pk);
         silc_free(fingerprint);
-        ret = SILC_MSG_SIGNED_UNKNOWN;
+        silc_free(fingerprint2);
+       return SILC_MSG_SIGNED_UNKNOWN;
       }
       silc_free(fingerprint2);
     }
@@ -1677,7 +1678,7 @@ void silc_command_reply(SilcClient client, SilcClientConnection conn,
 
       if (idle && nickname) {
        memset(buf, 0, sizeof(buf));
-       snprintf(buf, sizeof(buf) - 1, "%lu %s",
+       snprintf(buf, sizeof(buf) - 1, "%u %s",
                 idle > 60 ? (idle / 60) : idle,
                 idle > 60 ? "minutes" : "seconds");