Unverified Commit 7c8491ba authored by Sébastien Blin's avatar Sébastien Blin
Browse files

pjproject: fix crash in pj_turn_session_on_rx_pkt2()

Instead of letting the TURN session destroy itself when finished, the current
code is overriding the user_data attached to the session. This is not needed
because the turn session will be stopped when the timer will complete and
this can cause some crashes in pj_turn_session_on_rx_pkt2 because the data
is erased while not protected via turn_sock->grp_lock() (mostly in turn_sock.c,

Change-Id: Ia4a12917711b5534b372cb3a26e9141e5393c569
Gitlab: #299
parent 3f598a6a
pjnath/src/pjnath/turn_sock.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/pjnath/src/pjnath/turn_sock.c b/pjnath/src/pjnath/turn_sock.c
index a6e192e9f..3fc65aa75 100644
--- a/pjnath/src/pjnath/turn_sock.c
+++ b/pjnath/src/pjnath/turn_sock.c
@@ -1396,9 +1396,6 @@ static void turn_on_state(pj_turn_session *sess,
if (new_state >= PJ_TURN_STATE_DESTROYING && turn_sock->sess) {
pj_time_val delay = {0, 0};
- turn_sock->sess = NULL;
- pj_turn_session_set_user_data(sess, NULL);
&turn_sock->timer, 0);
......@@ -16,7 +16,8 @@
"project_paths": [
......@@ -56,6 +56,7 @@ pjproject: pjproject-$(PJPROJECT_VERSION).tar.gz .sum-pjproject
$(APPLY) $(SRC)/pjproject/0009-add-config-site.patch
$(APPLY) $(SRC)/pjproject/0010-fix-pkgconfig.patch
$(APPLY) $(SRC)/pjproject/0011-fix-tcp-death-detection.patch
$(APPLY) $(SRC)/pjproject/0012-fix-turn-shutdown-crash.patch
$(APPLY) $(SRC)/pjproject/0001-android.patch
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment