a8b82cf7017f634d53bf02b38553f681470fb711
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / tcpdump / 0003-fix-CVE-2014-8768.patch
1 From https://bugzilla.redhat.com/show_bug.cgi?id=1165161
2
3 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
4
5 --- tcpdump-tcpdump_4.5/print-geonet.c  2014-02-17 05:58:41.000000000 +0700
6 +++ print-geonet.c      2014-11-21 10:06:58.590217933 +0700
7 @@ -237,6 +237,12 @@
8                 printf("Malformed (small) ");
9         }
10  
11 +       /* Checking length before print */
12 +       u_int caplength;
13 +       caplength = (ndo->ndo_snapend >= bp) ? ndo->ndo_snapend - bp : 0;
14 +       if (length > caplength)
15 +               length = caplength;
16 +
17         /* Print user data part */
18         if (ndo->ndo_vflag)
19                 default_print(bp, length);