Change in osmo-hlr[master]: mdns: properly zero initialize result data

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/.

neels gerrit-no-reply at lists.osmocom.org
Fri Nov 29 13:30:22 UTC 2019


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16335 )


Change subject: mdns: properly zero initialize result data
......................................................................

mdns: properly zero initialize result data

Otherwise, if a response contained only one IP address version, the other one
is random data.

  DDGSM DEBUG (IMSI-901700000014706) Resolved remote HLR, sending spooled GSUP messages: gsup.hlr.901700000014706.imsi -> ipv4: 127.0.0.1:4222 -> ipv6: ð`:0 (age=0) (last) (dgsm.c:93)

Change-Id: Ie58ccc01e107cd2939ca782ab6fa5f6e16195433
---
M src/mslookup/mdns.c
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/35/16335/1

diff --git a/src/mslookup/mdns.c b/src/mslookup/mdns.c
index 9eac7c6..198cebf 100644
--- a/src/mslookup/mdns.c
+++ b/src/mslookup/mdns.c
@@ -269,6 +269,8 @@
 	bool found_ip_v6 = false;
 	struct osmo_sockaddr_str *expect_port_for = NULL;
 
+	*result = (struct osmo_mslookup_result){};
+
 	result->rc = OSMO_MSLOOKUP_RC_NONE;
 
 	llist_for_each_entry(rec, &ans->records, list) {

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ie58ccc01e107cd2939ca782ab6fa5f6e16195433
Gerrit-Change-Number: 16335
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191129/b908fa15/attachment.htm>


More information about the gerrit-log mailing list