Change in osmo-hlr[master]: osmo_mslookup_server_mdns_rx(): handle read() rc == 0

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
Tue May 5 00:03:27 UTC 2020


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


Change subject: osmo_mslookup_server_mdns_rx(): handle read() rc == 0
......................................................................

osmo_mslookup_server_mdns_rx(): handle read() rc == 0

Coverity says "tainted buffer", I hope it means the case of read() returning
zero.

Related: coverity CID#210170
Change-Id: Ia2d57cb8bbacc6f54dc410047da69a983aedd24d
---
M src/mslookup_server_mdns.c
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/src/mslookup_server_mdns.c b/src/mslookup_server_mdns.c
index 0e94074..a669526 100644
--- a/src/mslookup_server_mdns.c
+++ b/src/mslookup_server_mdns.c
@@ -71,7 +71,7 @@
 
 	/* Parse the message and print it */
 	n = read(osmo_fd->fd, buffer, sizeof(buffer));
-	if (n < 0)
+	if (n <= 0)
 		return n;
 
 	ctx = talloc_named_const(server, 0, __func__);

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ia2d57cb8bbacc6f54dc410047da69a983aedd24d
Gerrit-Change-Number: 18040
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/20200505/e774ccfe/attachment.htm>


More information about the gerrit-log mailing list