mirror of
https://github.com/troglobit/finit.git
synced 2026-10-05 15:23:31 +07:00
inet_dgram_drop(): Check return value from recv()
Found by Coverity Scan. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+3
-3
@@ -78,11 +78,11 @@ static void inetd_dgram_drop(int sd, const char *ifname)
|
||||
|
||||
do {
|
||||
inetd_dgram_peek(sd, pkt_interface);
|
||||
if(string_compare(pkt_interface, ifname)) {
|
||||
recv(sd, buf, sizeof(buf), 0);
|
||||
if (string_compare(pkt_interface, ifname)) {
|
||||
if (recv(sd, buf, sizeof(buf), 0) < 0)
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
} while (0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user