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
This commit is contained in:
Neels Hofmeyr 2020-05-04 19:15:22 +02:00
parent 1bd3ec49b1
commit 010ceb8206
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ static int osmo_mslookup_server_mdns_rx(struct osmo_fd *osmo_fd, unsigned int wh
/* 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__);