Change in osmo-mgw[master]: mcgp_client: initalize domain name from mgcp_client_conf_init

dexter gerrit-no-reply at lists.osmocom.org
Thu Jul 22 10:07:32 UTC 2021


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/25004 )


Change subject: mcgp_client: initalize domain name from mgcp_client_conf_init
......................................................................

mcgp_client: initalize domain name from mgcp_client_conf_init

Te function mgcp_client_conf_init initalizes an mgcp client
configuration struct with some default values but it does not initalize
the buffer for the mgw domain name. If the configuration is not
initalized with zeros by the API user in some way, the endpoint domain
name buffer still might contain random data, even after
calling mgcp_client_conf_init().

Change-Id: Iabef17c7ab0e0f4a9a0cb3ad4ec83006bd07f566
---
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/04/25004/1

diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index 9d60ee8..7a7dcb5 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -201,6 +201,9 @@
 		.remote_addr = NULL,
 		.remote_port = -1,
 	};
+
+	/* See also function mgcp_client_endpoint_domain() */
+	memset(conf->endpoint_domain_name, 0, sizeof(conf->endpoint_domain_name));
 }
 
 static void mgcp_client_handle_response(struct mgcp_client *mgcp,

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Iabef17c7ab0e0f4a9a0cb3ad4ec83006bd07f566
Gerrit-Change-Number: 25004
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210722/0ec243d6/attachment.htm>


More information about the gerrit-log mailing list