From 3b8ff4bf0d8f389e00c19d6c094bce2bbf00deca Mon Sep 17 00:00:00 2001 From: Francois-Xavier Le Bail Date: Mon, 7 Sep 2020 11:22:49 +0200 Subject: Remove some now redundant ND_TCHECK_LEN(e, sizeof(nd_ipv4)) calls They are redundant because they are followed by a GET_IPADDR_STRING(e) call, same e, which do the bounds check. Remove unused 'trunc' label(s) and associated code(s). --- print-isoclns.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'print-isoclns.c') diff --git a/print-isoclns.c b/print-isoclns.c index 288c4b18..e842a008 100644 --- a/print-isoclns.c +++ b/print-isoclns.c @@ -3236,7 +3236,6 @@ isis_print(netdissect_options *ndo, case ISIS_TLV_TE_ROUTER_ID: if (tlen < sizeof(nd_ipv4)) goto tlv_trunc; - ND_TCHECK_LEN(pptr, sizeof(nd_ipv4)); ND_PRINT("\n\t Traffic Engineering Router ID: %s", GET_IPADDR_STRING(pptr)); break; @@ -3244,7 +3243,6 @@ isis_print(netdissect_options *ndo, while (tlen != 0) { if (tlen < sizeof(nd_ipv4)) goto tlv_trunc; - ND_TCHECK_LEN(tptr, sizeof(nd_ipv4)); ND_PRINT("\n\t IPv4 interface address: %s", GET_IPADDR_STRING(tptr)); tptr += sizeof(nd_ipv4); tlen -= sizeof(nd_ipv4); @@ -3274,14 +3272,12 @@ isis_print(netdissect_options *ndo, if (tlen < sizeof(nd_ipv4)) break; - ND_TCHECK_LEN(tptr, sizeof(nd_ipv4)); ND_PRINT("\n\t IPv4 interface address: %s", GET_IPADDR_STRING(tptr)); tptr+=sizeof(nd_ipv4); tlen-=sizeof(nd_ipv4); if (tlen < sizeof(nd_ipv4)) break; - ND_TCHECK_LEN(tptr, sizeof(nd_ipv4)); ND_PRINT("\n\t IPv4 neighbor address: %s", GET_IPADDR_STRING(tptr)); tptr+=sizeof(nd_ipv4); tlen-=sizeof(nd_ipv4); -- cgit v1.2.1