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 <pma...@sysmocom.de>

Reply via email to