diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2015-04-15 00:38:54 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2015-04-15 00:38:54 +0000 |
commit | 04f9989aa4cd322074d15bd58331dc3dfe190366 (patch) | |
tree | 54a3636b2f3fdbacc6636292b0296fac724fde91 /pjnath | |
parent | f747d68f17ae1464f15adfb9c616366ca2c33cf3 (diff) |
Fixed #1844: Replaced assertion check of component ID range with normal check.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5070 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjnath')
-rw-r--r-- | pjnath/src/pjnath/ice_session.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c index f2de0c9b..f3137c9d 100644 --- a/pjnath/src/pjnath/ice_session.c +++ b/pjnath/src/pjnath/ice_session.c @@ -560,7 +560,11 @@ PJ_DEF(pj_status_t) pj_ice_sess_set_prefs(pj_ice_sess *ice, /* Find component by ID */ static pj_ice_sess_comp *find_comp(const pj_ice_sess *ice, unsigned comp_id) { - pj_assert(comp_id > 0 && comp_id <= ice->comp_cnt); + /* Ticket #1844: possible wrong assertion when remote has less ICE comp */ + //pj_assert(comp_id > 0 && comp_id <= ice->comp_cnt); + if (comp_id > ice->comp_cnt) + return NULL; + return (pj_ice_sess_comp*) &ice->comp[comp_id-1]; } |