mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Merge pull request #1715 from MarcoPolo-PasTonMolo/fix/ox-discover-segfault
Fix segfault on `/ox discover`
This commit is contained in:
commit
fe0b7dac53
@ -325,12 +325,15 @@ _ox_metadata_result(xmpp_stanza_t* const stanza, void* const userdata)
|
|||||||
|
|
||||||
while (pubkeymetadata) {
|
while (pubkeymetadata) {
|
||||||
const char* fingerprint = xmpp_stanza_get_attribute(pubkeymetadata, STANZA_ATTR_V4_FINGERPRINT);
|
const char* fingerprint = xmpp_stanza_get_attribute(pubkeymetadata, STANZA_ATTR_V4_FINGERPRINT);
|
||||||
|
|
||||||
|
if (fingerprint) {
|
||||||
if (strlen(fingerprint) == KEYID_LENGTH) {
|
if (strlen(fingerprint) == KEYID_LENGTH) {
|
||||||
cons_show(fingerprint);
|
cons_show(fingerprint);
|
||||||
} else {
|
} else {
|
||||||
cons_show("OX: Wrong char size of public key");
|
cons_show("OX: Wrong char size of public key");
|
||||||
log_error("[OX] Wrong chat size of public key %s", fingerprint);
|
log_error("[OX] Wrong chat size of public key %s", fingerprint);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
pubkeymetadata = xmpp_stanza_get_next(pubkeymetadata);
|
pubkeymetadata = xmpp_stanza_get_next(pubkeymetadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user