package/gcc: fix libgcc build for xtensa
[buildroot-gz.git] / package / tcpdump / 0004-fix-CVE-2014-8769.patch
blob38eaf1247c1f3a8f5d8a900da2dddf820437e612
1 From https://bugzilla.redhat.com/show_bug.cgi?id=1165162
3 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
5 --- tcpdump-tcpdump-4.6/print-udp.c 2014-11-21 13:53:05.757690197 +0700
6 +++ tcpdump-4.6.2/print-udp.c 2014-11-21 13:50:58.077695164 +0700
7 @@ -357,6 +357,12 @@
8 #ifdef INET6
9 register const struct ip6_hdr *ip6;
10 #endif
11 + u_int caplength;
13 + /* Checking length of available data before print */
14 + caplength = (ndo->ndo_snapend >= bp) ? ndo->ndo_snapend - bp : 0;
15 + if (length > caplength)
16 + length = caplength;
18 if (ep > ndo->ndo_snapend)
19 ep = ndo->ndo_snapend;