[PATCH] 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
Wed Dec 13 13:37:28 UTC 2017


Review at  https://gerrit.osmocom.org/5318

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(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/18/5318/1

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: newchange
Gerrit-Change-Id: I594a06fc9dd1bf0522f6e72a8943df52448d2ce4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list