Skip to content

Commit

Permalink
b2b_logic: Fix a logical bug which could cause crashes
Browse files Browse the repository at this point in the history
... in b2b_init_request().  Completes c84fe37.

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 dec3809)
  • Loading branch information
liviuchircu committed Feb 2, 2024
1 parent 42a6d32 commit 80acd74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/b2b_logic/logic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 80acd74

Please sign in to comment.