Fix Wstringop-overflow warning from util/srp.cpp (#6855)
authoryou <ovvv@web.de>
Thu, 4 Jan 2018 13:25:20 +0000 (14:25 +0100)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Thu, 4 Jan 2018 13:25:20 +0000 (14:25 +0100)
* Fix Wstringop-overflow warning from util/srp.cpp

src/util/srp.cpp

index 4c1a772e2c8d796aa4aa59d3a627c6e97032bfa4..9aed9eb0c66dad1cb261bc33dc973fd688085dd0 100644 (file)
@@ -39,6 +39,7 @@
 #include <cstdlib>
 #include <cstring>
 #include <cstdio>
+#include <cstdint>
 
 #include <config.h>
 
@@ -418,7 +419,7 @@ static SRP_Result H_nn(
 }
 
 static SRP_Result H_ns(mpz_t result, SRP_HashAlgorithm alg, const unsigned char *n,
-       size_t len_n, const unsigned char *bytes, size_t len_bytes)
+       size_t len_n, const unsigned char *bytes, uint32_t len_bytes)
 {
        unsigned char buff[SHA512_DIGEST_LENGTH];
        size_t nbytes = len_n + len_bytes;