[MERGED] osmo-mgw[master]: client: mgcp_response_parse_params: check rtp port

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Thu Jan 4 10:57:04 UTC 2018


dexter has submitted this change and it was merged.

Change subject: client: mgcp_response_parse_params: check rtp port
......................................................................


client: mgcp_response_parse_params: check rtp port

Also check the port number for plausibility like we do it
already for the IP-Address

Change-Id: I594a06fc9dd1bf0522f6e72a8943df52448d2ce4
---
M src/libosmo-mgcp-client/mgcp_client.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index 1c35aa9..7e07d00 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -180,6 +180,9 @@
 		   &r->audio_port) != 1)
 		goto response_parse_failure;
 
+	if (r->audio_port == 0)
+		goto response_parse_failure;
+
 	return 0;
 
 response_parse_failure:

-- 
To view, visit https://gerrit.osmocom.org/5318
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I594a06fc9dd1bf0522f6e72a8943df52448d2ce4
Gerrit-PatchSet: 2
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list