From 80acd74afc5cfe6a8d0fe7258b0b9d2f9300eaca Mon Sep 17 00:00:00 2001 From: Liviu Chircu Date: Fri, 2 Feb 2024 15:06:06 +0200 Subject: [PATCH] b2b_logic: Fix a logical bug which could cause crashes ... in b2b_init_request(). Completes c84fe372c. Neither @e1 or @e2 can be NULL after the "if" guard, otherwise there is a good chance of a crash shortly afterwards. (cherry picked from commit dec380907283b962fa2f1296b0fec1cd730708ea) --- modules/b2b_logic/logic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/b2b_logic/logic.c b/modules/b2b_logic/logic.c index cc03a5148ab..c7d0ef79bae 100644 --- a/modules/b2b_logic/logic.c +++ b/modules/b2b_logic/logic.c @@ -2896,7 +2896,7 @@ str* b2b_process_scenario_init(struct sip_msg* msg, b2bl_cback_f cbf, goto error; } - if (!e1 && !e2) { + if (!e1 || !e2) { LM_ERR("Two bridge entities required!\n"); goto error; }