Merge pull request #1699 from profanity-im/1698-fixoxabrt

Fix SIGABRT when using wrong argument order for receiving ox key
This commit is contained in:
Michael Vetter
2022-04-27 16:51:39 +02:00
committed by GitHub
2 changed files with 6 additions and 7 deletions

View File

@@ -340,7 +340,11 @@ _ox_request_public_key(const char* const jid, const char* const fingerprint)
{
assert(jid);
assert(fingerprint);
assert(strlen(fingerprint) == KEYID_LENGTH);
if (strlen(fingerprint) != KEYID_LENGTH) {
cons_show_error("Invalid fingerprint length for: %s", fingerprint);
}
cons_show("Requesting Public Key %s for %s", fingerprint, jid);
log_info("[OX] Request %s's public key %s.", jid, fingerprint);
// iq