X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/7b1cba646d765868d21e7c66af54ed06f2a739b7..refs/heads/tcpdump-4.9:/signature.c diff --git a/signature.c b/signature.c index c97b8534..204e3456 100644 --- a/signature.c +++ b/signature.c @@ -12,7 +12,7 @@ * * Functions for signature and digest verification. * - * Original code by Hannes Gredler (hannes@juniper.net) + * Original code by Hannes Gredler (hannes@gredler.at) */ #ifdef HAVE_CONFIG_H @@ -130,7 +130,7 @@ signature_verify(netdissect_options *ndo, const u_char *pptr, u_int plen, /* * Do we have all the packet data to be checked? */ - if (!ND_TTEST2(pptr, plen)) { + if (!ND_TTEST2(*pptr, plen)) { /* No. */ return (CANT_CHECK_SIGNATURE); } @@ -138,11 +138,11 @@ signature_verify(netdissect_options *ndo, const u_char *pptr, u_int plen, /* * Do we have the entire signature to check? */ - if (!ND_TTEST2(sig_ptr, sizeof(sig))) { + if (!ND_TTEST2(*sig_ptr, sizeof(sig))) { /* No. */ return (CANT_CHECK_SIGNATURE); } - if ((sig_ptr + sizeof(sig) - pptr) > plen) { + if (sig_ptr + sizeof(sig) > pptr + plen) { /* No. */ return (CANT_CHECK_SIGNATURE); } @@ -167,7 +167,7 @@ signature_verify(netdissect_options *ndo, const u_char *pptr, u_int plen, * Clear anything else that needs to be cleared in the copy. * Our caller is assumed to have vetted the clear_arg pointer. */ - (*clear_rtn)((void *)(packet_copy + ((const u_int8_t *)clear_arg - pptr))); + (*clear_rtn)((void *)(packet_copy + ((const uint8_t *)clear_arg - pptr))); /* * Compute the signature.