--- tcpdump-3.9.1/print-bgp.c.orig 2005-07-06 14:59:51.000000000 +0200 +++ tcpdump-3.9.1/print-bgp.c 2005-07-06 15:00:36.000000000 +0200 @@ -1176,7 +1176,7 @@ printf(", no SNPA"); } - while (len - (tptr - pptr) > 0) { + while ((tptr - pptr) > 0 && len - (tptr - pptr) > 0) { switch (af<<8 | safi) { case (AFNUM_INET<<8 | SAFNUM_UNICAST): case (AFNUM_INET<<8 | SAFNUM_MULTICAST):