diff options
-rw-r--r-- | tap.c | 2 | ||||
-rw-r--r-- | tcp.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -340,7 +340,7 @@ resume: iph = (struct iphdr *)(eh + 1); if ((iph->ihl * 4) + sizeof(*eh) > len) continue; - if (iph->ihl * 4 < sizeof(*iph)) + if (iph->ihl * 4 < (int)sizeof(*iph)) continue; if (iph->saddr && c->addr4_seen != iph->saddr) { @@ -1034,7 +1034,7 @@ static int tcp_opt_get(struct tcphdr *th, size_t len, uint8_t type_search, uint8_t type, optlen; char *p; - if (len > th->doff * 4) + if (len > (unsigned)th->doff * 4) len = th->doff * 4; len -= sizeof(*th); |