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:
parent
1bd3ec49b1
commit
010ceb8206
|
@ -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 */
|
/* Parse the message and print it */
|
||||||
n = read(osmo_fd->fd, buffer, sizeof(buffer));
|
n = read(osmo_fd->fd, buffer, sizeof(buffer));
|
||||||
if (n < 0)
|
if (n <= 0)
|
||||||
return n;
|
return n;
|
||||||
|
|
||||||
ctx = talloc_named_const(server, 0, __func__);
|
ctx = talloc_named_const(server, 0, __func__);
|
||||||
|
|
Loading…
Reference in New Issue