#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.70 2001-11-15 08:23:12 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.71 2002-02-05 10:03:34 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
register const struct atShortDDP *sdp;
u_short snet;
+ /*
+ * Our packet is on a 4-byte boundary, as we're either called
+ * directly from a top-level link-layer printer (ltalk_if_print)
+ * or from the UDP printer. The LLAP+DDP header is a multiple
+ * of 4 bytes in length, so the DDP payload is also on a 4-byte
+ * boundary, and we don't need to align it before calling
+ * "ddp_print()".
+ */
lp = (const struct LAP *)bp;
bp += sizeof(*lp);
length -= sizeof(*lp);
int i;
const u_char *ep;
+ if (length < nbpHeaderSize) {
+ (void)printf(" truncated-nbp %d", length);
+ return;
+ }
+
length -= nbpHeaderSize;
if (length < 8) {
/* must be room for at least one tuple */