pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/26917 )
Change subject: call_leg: local_bridge: Avoid null pointer access if CN-side not ready ......................................................................
call_leg: local_bridge: Avoid null pointer access if CN-side not ready
This happens if for instance an HNBGW drops the RAB-AssignmentRequest and does nothing with it.
call_leg.c:348:15: runtime error: member access within null pointer of type 'struct rtp_stream'
Related: OS#5401 Change-Id: I67d2d5b2dd3b367c34f929d63c056306ec001431 --- M src/libmsc/call_leg.c 1 file changed, 3 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified dexter: Looks good to me, but someone else must approve; Verified neels: Looks good to me, but someone else must approve pespin: Looks good to me, approved
diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c index 6242a80..e890f75 100644 --- a/src/libmsc/call_leg.c +++ b/src/libmsc/call_leg.c @@ -344,6 +344,9 @@ } codec = cl1->rtp[RTP_TO_RAN]->codec;
+ if (!cl1->rtp[RTP_TO_CN] || !cl2->rtp[RTP_TO_CN]) + return -ENOTCONN; + call_leg_ensure_ci(cl1, RTP_TO_CN, call_id1, trans1, &codec, &cl2->rtp[RTP_TO_CN]->local); call_leg_ensure_ci(cl2, RTP_TO_CN, call_id2, trans2,