Skip to content

Commit

Permalink
b2b_logic: fix possible crash while bridging
Browse files Browse the repository at this point in the history
When processing a 200 OK while bridging, an old pointer to a temporary,
already freed entity was being used when saving the out SDP for the
second bridge entity.
  • Loading branch information
rvlad-patrascu committed Apr 3, 2023
1 parent 4d0199f commit 91fdcfd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/b2b_logic/bridging.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ int process_bridge_200OK(struct sip_msg* msg, str* extra_headers,
entity->sdp_type = B2BL_SDP_NORMAL;
entity->no =1;
tuple->bridge_entities[1] = entity;
bentity1 = entity;
if (0 != b2bl_add_client(tuple, entity))
return -1;
} else if (bentity1->type == B2B_CLIENT &&
Expand Down

0 comments on commit 91fdcfd

Please sign in to comment.