From: Guy Harris Date: Mon, 22 Oct 2018 08:23:45 +0000 (-0700) Subject: Handle *all* protocol qualifiers in gen_host() - even link/tr/etc. X-Git-Tag: libpcap-1.10-bp~762 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/dcce86c9adf20c71bf2b4405270a6e3ffeb12013 Handle *all* protocol qualifiers in gen_host() - even link/tr/etc. We missed that one. Credit to OSS-Fuzz for finding this issue. --- diff --git a/gencode.c b/gencode.c index 536c73d2..33d81d82 100644 --- a/gencode.c +++ b/gencode.c @@ -4814,6 +4814,9 @@ gen_host(compiler_state_t *cstate, bpf_u_int32 addr, bpf_u_int32 mask, } return b0; + case Q_LINK: + bpf_error(cstate, "link-layer modifier applied to %s", typestr); + case Q_IP: return gen_hostop(cstate, addr, mask, dir, ETHERTYPE_IP, 12, 16);