Change in osmo-mgw[master]: mgcp_protocol: assert endp when it becomes mandatory

dexter gerrit-no-reply at lists.osmocom.org
Tue Jul 27 08:44:33 UTC 2021


dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/25026 )

Change subject: mgcp_protocol: assert endp when it becomes mandatory
......................................................................

mgcp_protocol: assert endp when it becomes mandatory

The logic when an endp pointer is guranteed and when we are able to
process the request without the endp pointer populated is qute complex.
This shows up as a bug to coverity.

Change-Id: I1d4221f2df13c43321d5466534485cf21f0d9010
Fixes: CID#237088
---
M src/libosmo-mgcp/mgcp_protocol.c
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  dexter: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index aef41e0..e69c00f 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -1467,6 +1467,10 @@
 		return create_ok_response(NULL, 200, "DLCX", pdata->trans);
 	}
 
+	/* The logic does not permit to go past this point without having the
+	 * the endp pointer populated. */
+	OSMO_ASSERT(endp);
+
 	/* When no connection id is supplied, we will interpret this as a
 	 * wildcarded DLCX that refers to the selected endpoint. This means
 	 * that we drop all connections on that specific endpoint at once.

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/25026
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I1d4221f2df13c43321d5466534485cf21f0d9010
Gerrit-Change-Number: 25026
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210727/18db0ebe/attachment.htm>


More information about the gerrit-log mailing list