X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/63216357de0aa557888329c614946626e37d7c6b..5ef0bcb5edd748de9d9af13c40da0395dfdd94e8:/print-domain.c diff --git a/print-domain.c b/print-domain.c index 1486b5d1..ad08073f 100644 --- a/print-domain.c +++ b/print-domain.c @@ -116,25 +116,19 @@ blabel_print(netdissect_options *ndo, /* print the bit string as a hex string */ ND_PRINT("\\[x"); for (bitp = cp + 1, b = bitlen; bitp < lim && b > 7; b -= 8, bitp++) { - ND_TCHECK_1(bitp); ND_PRINT("%02x", GET_U_1(bitp)); } if (b > 4) { - ND_TCHECK_1(bitp); tc = GET_U_1(bitp); bitp++; ND_PRINT("%02x", tc & (0xff << (8 - b))); } else if (b > 0) { - ND_TCHECK_1(bitp); tc = GET_U_1(bitp); bitp++; ND_PRINT("%1x", ((tc >> 4) & 0x0f) & (0x0f << (4 - b))); } ND_PRINT("/%u]", bitlen); return lim; -trunc: - ND_PRINT(".../%u]", bitlen); - return NULL; } static int @@ -928,7 +922,7 @@ domain_print(netdissect_options *ndo, if (cp + 1 > ndo->ndo_snapend) goto print; if (type == T_OPT) { - rcode |= (*cp << 4); + rcode |= (GET_U_1(cp) << 4); goto print; } cp += 4;