From: Francois-Xavier Le Bail Date: Thu, 10 Dec 2020 20:23:46 +0000 (+0100) Subject: ISIS: Replace the 'if (nd_printzp()) goto trunc' by nd_printjnp() calls X-Git-Tag: tcpdump-4.99-bp~31 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/42c0601fcf03834b848e2455c8a041cb60b7af9a ISIS: Replace the 'if (nd_printzp()) goto trunc' by nd_printjnp() calls Moreover: Use the sizeof operator. --- diff --git a/print-isoclns.c b/print-isoclns.c index 6762f4d9..3b4a1502 100644 --- a/print-isoclns.c +++ b/print-isoclns.c @@ -1465,8 +1465,7 @@ isis_print_mcid(netdissect_options *ndo, ND_TCHECK_SIZE(mcid); ND_PRINT("ID: %u, Name: ", GET_U_1(mcid->format_id)); - if (nd_printzp(ndo, mcid->name, 32, ndo->ndo_snapend)) - goto trunc; + nd_printjnp(ndo, mcid->name, sizeof(mcid->name)); ND_PRINT("\n\t Lvl: %u", GET_BE_U_2(mcid->revision_lvl)); @@ -3120,8 +3119,7 @@ isis_print(netdissect_options *ndo, switch (auth_type) { case ISIS_SUBTLV_AUTH_SIMPLE: - if (nd_printzp(ndo, tptr, tlen, ndo->ndo_snapend)) - goto trunc; + nd_printjnp(ndo, tptr, tlen); break; case ISIS_SUBTLV_AUTH_MD5: for(i=0;indo_snapend)) - goto trunc; + nd_printjnp(ndo, tptr, tlen); break; case ISIS_TLV_SHARED_RISK_GROUP: