From d666b1cf96185fc3b6599c6d78b80fce6538b65b Mon Sep 17 00:00:00 2001 From: Christian Spielberger Date: Mon, 16 Dec 2024 09:09:21 +0100 Subject: [PATCH] bevent: check ENOMEM for display name --- src/bevent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bevent.c b/src/bevent.c index 56c1755cd..b1e370ab2 100644 --- a/src/bevent.c +++ b/src/bevent.c @@ -507,9 +507,9 @@ int odict_encode_bevent(struct odict *od, struct bevent *event) err = odict_pl_add(od, "contact", &hdr->val); if (pl_isset(&msg->from.dname)) - odict_pl_add(od, "display", &msg->from.dname); + err = odict_pl_add(od, "display", &msg->from.dname); - err = re_sdprintf(&buf, "%H", uri_encode, &msg->from.uri); + err |= re_sdprintf(&buf, "%H", uri_encode, &msg->from.uri); err |= odict_entry_add(od, "from", ODICT_STRING, buf); mem_deref(buf); if (err)