From ea78bfe6e13e6ea10088ec19a90a158198ba7fd6 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 1 Dec 2022 08:59:23 -0500 Subject: [PATCH] MT#55984 safeguard against possible null return `call_get_monologue_new` is supposed to always return a full dialogue, but an error in invocation (using a from-tag that doesn't belong to an offer/answer) can lead to the second half being unset. Return an error in this case. Change-Id: I84b21ff5e5c0403fc07cae83fee206705ecff8b3 (cherry picked from commit c8171f760965f94b02a815cf452c32758439214c) --- daemon/call.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/call.c b/daemon/call.c index f62ab6537..4fb16d0a4 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -4205,6 +4205,8 @@ ok_check_tag: break; // there should only be one // XXX check if there's more than a one-to-one mapping here? } + if (G_UNLIKELY(!os)) + return -1; __tags_associate(ret, os); dialogue[0] = ret; dialogue[1] = os;