pimd: Untrusted val as argument (Coverity 1465491)

Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
paco 2018-06-15 12:57:47 +02:00
parent e4a374681d
commit 18e994a043
No known key found for this signature in database
GPG Key ID: FD112A8C7E6A5E4A

View File

@ -296,6 +296,10 @@ static int recv_response(int fd, int *hops, struct igmp_mtrace *mtracer)
mtrace_len = ntohs(ip->ip_len) - ip->ip_hl * 4;
if ((char *)mtrace + mtrace_len
> (char *)mtrace_buf + IP_AND_MTRACE_BUF_LEN)
return -1;
if (mtrace_len < (int)MTRACE_HDR_SIZE)
return -1;