]> The Tcpdump Group git mirrors - libpcap/commitdiff
+ and - are left associative in C 720/head
authorCedric Cellier <[email protected]>
Thu, 24 May 2018 09:46:30 +0000 (11:46 +0200)
committerGitHub <[email protected]>
Thu, 24 May 2018 09:46:30 +0000 (11:46 +0200)
rpcapd/daemon.c

index b9ce8f6b5f9971c4e7500c2884682261597d83ba..9c035c0e96ce4e2f50039a891d53f07c6f81ba53 100755 (executable)
@@ -2258,7 +2258,7 @@ daemon_thrdatamain(void *ptr)
                sendbuf = NULL; // we can't allocate a buffer, so nothing to free
                goto error;
        }
-       if ((unsigned int)pcap_snapshot(session->fp) > SIZE_MAX - sizeof(struct rpcap_header) + sizeof(struct rpcap_pkthdr))
+       if ((unsigned int)pcap_snapshot(session->fp) > SIZE_MAX - (sizeof(struct rpcap_header) + sizeof(struct rpcap_pkthdr)))
        {
                //
                // The snapshot length is so large that it would overflow