]> The Tcpdump Group git mirrors - tcpdump/commitdiff
RX: Remove 1 now redundant ND_TCHECK_LEN(e, sizeof(uint32_t)) call
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 30 Sep 2020 08:48:04 +0000 (10:48 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 30 Sep 2020 11:20:53 +0000 (13:20 +0200)
it is redundant because it is identical to ND_TCHECK_4(e), followed
by a GET_BE_U_4(e), same e, which do the bounds check.

print-rx.c

index 7dfa3ddb9864cca0cea9b26b50ef26e1a7b5dd49..3b7a623dde543e0e07a7a334fafedc9d99b9c6ba 100644 (file)
@@ -766,7 +766,6 @@ rx_cache_find(netdissect_options *ndo, const struct rx_header *rxh,
                }
 
 #define STROUT(MAX) { uint32_t _i; \
-                       ND_TCHECK_LEN(bp, sizeof(uint32_t)); \
                        _i = GET_BE_U_4(bp); \
                        if (_i > (MAX)) \
                                goto trunc; \