Add a nd_print_trunc() call
Replace a ND_TTEST_*() with ND_TCHECK_*().
Update the output of some tests accordingly.
diff --git a/print-isoclns.c b/print-isoclns.c
index 38f40d1..246b681 100644
--- a/print-isoclns.c
+++ b/print-isoclns.c
@@ -679,10 +679,7 @@
isoclns_print(netdissect_options *ndo, const u_char *p, u_int length)
{
ndo->ndo_protocol = "isoclns";
- if (!ND_TTEST_1(p)) { /* enough bytes on the wire ? */
- ND_PRINT("|OSI");
- return;
- }
+ ND_TCHECK_1(p); /* enough bytes on the wire ? */
if (ndo->ndo_eflag)
ND_PRINT("OSI NLPID %s (0x%02x): ", tok2str(nlpid_values, "Unknown", EXTRACT_U_1(p)), EXTRACT_U_1(p));
@@ -731,6 +728,9 @@
print_unknown_data(ndo, p, "\n\t", length);
break;
}
+ return;
+trunc:
+ nd_print_trunc(ndo);
}
#define CLNP_PDU_ER 1
diff --git a/tests/isoclns-heapoverflow.out b/tests/isoclns-heapoverflow.out
index c2cfdfb..d73b415 100644
--- a/tests/isoclns-heapoverflow.out
+++ b/tests/isoclns-heapoverflow.out
@@ -1 +1 @@
-|OSI
+ [|isoclns]
diff --git a/tests/isoclns-oobr.out b/tests/isoclns-oobr.out
index c2cfdfb..d73b415 100644
--- a/tests/isoclns-oobr.out
+++ b/tests/isoclns-oobr.out
@@ -1 +1 @@
-|OSI
+ [|isoclns]