Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dialog: Fix crash due to a "tmp SDP" race condition
This fixes a race condition on the following code which runs, e.g., on a 200 OK to a Re-INVITE (added in d447626): if (dlg->legs[leg].tmp_out_sdp.s) { shm_free(dlg->legs[leg].tmp_out_sdp.s); dlg->legs[leg].tmp_out_sdp.s = 0; <--- we are here dlg->legs[leg].tmp_out_sdp.len = 0; } At this point, if the Re-INVITE is retransmitted and, e.g., dlg_callee_reinv_onreq_out() is run, the code may read a corrupt str value from "tmp_out_sdp" (e.g. {NULL, 172}), which will crash in shm_str_sync(). Many thanks to Ken Rice for the report! (cherry picked from commit 6ebbd9a)
- Loading branch information
1 parent
e455c5e
commit 7c92fff
Showing
2 changed files
with
24 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters