diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-10-21 17:36:05 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-10-21 17:36:05 +0200 |
commit | 000ae818d4e97b14fbf7fd83433db6df1de48e31 (patch) | |
tree | 2ac18992e219c8a44cb00355907b7c2b149fc53c | |
parent | 73a4a6b7cd4570f77c8ebb1cf6808b13d62b4db0 (diff) | |
download | passt-000ae818d4e97b14fbf7fd83433db6df1de48e31.tar passt-000ae818d4e97b14fbf7fd83433db6df1de48e31.tar.gz passt-000ae818d4e97b14fbf7fd83433db6df1de48e31.tar.bz2 passt-000ae818d4e97b14fbf7fd83433db6df1de48e31.tar.lz passt-000ae818d4e97b14fbf7fd83433db6df1de48e31.tar.xz passt-000ae818d4e97b14fbf7fd83433db6df1de48e31.tar.zst passt-000ae818d4e97b14fbf7fd83433db6df1de48e31.zip |
pcap: Fix failure check on write() in pcapm()
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | pcap.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -118,7 +118,8 @@ void pcapm(struct msghdr *mh) if (write(pcap_fd, &h, sizeof(h)) < 0) goto fail; - if (write(pcap_fd, (char *)iov->iov_base + 4, iov->iov_len - 4)) + if (write(pcap_fd, (char *)iov->iov_base + 4, + iov->iov_len - 4) < 0) goto fail; } |