]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Fix two bounds checks in signature_verify()
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 5 Dec 2017 20:27:31 +0000 (21:27 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 5 Dec 2017 20:28:47 +0000 (21:28 +0100)
signature.c

index 2091afb3e8e5ff0ccc63ab105d49ed76edbbdc6b..204e3456e2d47fa36b089f08f845ecffd8385765 100644 (file)
@@ -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,7 +138,7 @@ 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);
     }