X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/a4bcef4c86ffa85cdbd3e27af76cfafb6b673b50..d7b497cac78b6e22a66a6bae9bdec60a8044f67a:/print-resp.c diff --git a/print-resp.c b/print-resp.c index bec8b6da..d946c649 100644 --- a/print-resp.c +++ b/print-resp.c @@ -90,7 +90,7 @@ static int resp_get_length(netdissect_options *, register const u_char *, int, c #define FIND_CRLF(_ptr, _len) \ for (;;) { \ LCHECK2(_len, 2); \ - ND_TCHECK2(*_ptr, 2); \ + ND_TCHECK_2(_ptr); \ if (*_ptr == '\r' && *(_ptr+1) == '\n') \ break; \ _ptr++; \ @@ -493,7 +493,7 @@ resp_get_length(netdissect_options *ndo, register const u_char *bp, int len, con too_large = 1; } else { result *= 10; - if (result == INT_MAX && c > (INT_MAX % 10)) { + if (result == ((INT_MAX / 10) * 10) && c > (INT_MAX % 10)) { /* This will overflow an int when we add c */ too_large = 1; } else