summaryrefslogtreecommitdiff
path: root/print-resp.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-08-10 16:22:37 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-09-05 14:59:21 +0200
commit929e4be621ebdcede37865a5767a175f083f9138 (patch)
treebf6ecbc038696e66176b2d50e04e015767f23b3d /print-resp.c
parent54b5db3dde658894be730b15480f9b6e27b717a0 (diff)
downloadtcpdump-test-rc.tar.gz
Remove many (761) redundant ND_TCHECK_n() callstest-rc
ND_TCHECK_n(e), n in { 1, 2, 3, 4, 8 }. They are redundant because they are followed by a GET_.*_n(e) call, same n, same e, which do the bounds check. Remove unused 'trunc' labels and most associated codes. Update the outputs of some tests accordingly.
Diffstat (limited to 'print-resp.c')
-rw-r--r--print-resp.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/print-resp.c b/print-resp.c
index 244fec58..14fb6116 100644
--- a/print-resp.c
+++ b/print-resp.c
@@ -116,7 +116,6 @@ static int resp_get_length(netdissect_options *, const u_char *, int, const u_ch
#define FIND_CR_OR_LF(_ptr, _len) \
for (;;) { \
LCHECK(_len); \
- ND_TCHECK_1(_ptr); \
if (GET_U_1(_ptr) == '\r' || \
GET_U_1(_ptr) == '\n') \
break; \
@@ -250,7 +249,6 @@ resp_parse(netdissect_options *ndo, const u_char *bp, int length)
int ret_len;
LCHECK2(length, 1);
- ND_TCHECK_1(bp);
op = GET_U_1(bp);
/* bp now points to the op, so these routines must skip it */
@@ -481,7 +479,6 @@ resp_get_length(netdissect_options *ndo, const u_char *bp, int len, const u_char
for (;;) {
if (len == 0)
goto trunc;
- ND_TCHECK_1(bp);
c = GET_U_1(bp);
if (!(c >= '0' && c <= '9')) {
if (!saw_digit) {
@@ -519,7 +516,6 @@ resp_get_length(netdissect_options *ndo, const u_char *bp, int len, const u_char
len--;
if (len == 0)
goto trunc;
- ND_TCHECK_1(bp);
if (GET_U_1(bp) != '\n') {
bp++;
goto invalid;