X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/7bf069c2517690262aacbddc437731af991b31a7..fdd0467bcd46ea0d472111adedd21f43d6d4d15e:/print-bootp.c diff --git a/print-bootp.c b/print-bootp.c index 26ac0de9..51e53844 100644 --- a/print-bootp.c +++ b/print-bootp.c @@ -293,6 +293,7 @@ bootp_print(netdissect_options *ndo, ND_PRINT((ndo, "BOOTP/DHCP, %s", tok2str(bootp_op_values, "unknown (0x%02x)", bp->bp_op))); + ND_TCHECK(bp->bp_hlen); if (bp->bp_htype == 1 && bp->bp_hlen == 6 && bp->bp_op == BOOTPREQUEST) { ND_TCHECK2(bp->bp_chaddr[0], 6); ND_PRINT((ndo, " from %s", etheraddr_string(ndo, bp->bp_chaddr))); @@ -321,6 +322,7 @@ bootp_print(netdissect_options *ndo, if (EXTRACT_16BITS(&bp->bp_secs)) ND_PRINT((ndo, ", secs %d", EXTRACT_16BITS(&bp->bp_secs))); + ND_TCHECK(bp->bp_flags); ND_PRINT((ndo, ", Flags [%s]", bittok2str(bootp_flag_values, "none", EXTRACT_16BITS(&bp->bp_flags)))); if (ndo->ndo_vflag > 1) @@ -405,7 +407,7 @@ trunc: * s - short (16 bits) * b - period-seperated decimal bytes (variable length) * x - colon-seperated hex bytes (variable length) - * a - ascii string (variable length) + * a - ASCII string (variable length) * B - on/off (8 bits) * $ - special (explicit code to handle) */ @@ -423,7 +425,7 @@ static const struct tok tag2str[] = { { TAG_LPR_SERVER, "iLPR-Server" }, /* lpr server (RFC1179) */ { TAG_IMPRESS_SERVER, "iIM" }, /* impress servers (Imagen) */ { TAG_RLP_SERVER, "iRL" }, /* resource location (RFC887) */ - { TAG_HOSTNAME, "aHostname" }, /* ascii hostname */ + { TAG_HOSTNAME, "aHostname" }, /* ASCII hostname */ { TAG_BOOTSIZE, "sBS" }, /* 512 byte blocks */ { TAG_END, " END" }, /* RFC1497 tags */ @@ -703,7 +705,7 @@ rfc1048_print(netdissect_options *ndo, switch (c) { case 'a': - /* ascii strings */ + /* ASCII strings */ ND_PRINT((ndo, "\"")); if (fn_printn(ndo, bp, len, ndo->ndo_snapend)) { ND_PRINT((ndo, "\""));