From 10df93ee3e2d85d43bc5b0e4a0c48debc7bae1b4 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 25 Mar 2021 16:25:18 +0100 Subject: [PATCH] ox: guard printing of fingerprint --- src/xmpp/ox.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xmpp/ox.c b/src/xmpp/ox.c index 8661eb5b..c055863e 100644 --- a/src/xmpp/ox.c +++ b/src/xmpp/ox.c @@ -297,7 +297,9 @@ _ox_metadata_result(xmpp_conn_t* const conn, xmpp_stanza_t* const stanza, void* while (pubkeymetadata) { const char* fingerprint = xmpp_stanza_get_attribute(pubkeymetadata, STANZA_ATTR_V4_FINGERPRINT); - cons_show(fingerprint); + if (fingerprint) { + cons_show(fingerprint); + } pubkeymetadata = xmpp_stanza_get_next(pubkeymetadata); }