3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 02:18:49 +02:00

monitor: Cast bytes_read to incl_len type from PCAP packet

This commit is contained in:
Marcel Holtmann 2017-03-07 21:51:22 +01:00
parent 25a2ec7c11
commit 43efaf0163

View File

@ -215,7 +215,7 @@ bool pcap_read(struct pcap *pcap, struct timeval *tv,
return false;
}
if (bytes_read < pkt.incl_len) {
if ((uint32_t) bytes_read < pkt.incl_len) {
if (lseek(pcap->fd, pkt.incl_len - bytes_read, SEEK_CUR) < 0) {
pcap->closed = true;
return false;