Fix Wstringop-overflow warning from util/srp.cpp (#6855)
authoryou <ovvv@web.de>
Thu, 4 Jan 2018 13:25:20 +0000 (14:25 +0100)
committerSmallJoker <mk939@ymail.com>
Sun, 3 Jun 2018 15:32:00 +0000 (17:32 +0200)
* Fix Wstringop-overflow warning from util/srp.cpp

src/util/srp.cpp

index 430ba11379ec0e722abdae88aecea1d8b40d1d9b..f27f4f3f91a25786a88e8f4f74d4ba7fd2c8dde3 100644 (file)
@@ -38,6 +38,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
+#include <stdint.h>
 
 #include <config.h>
 
@@ -417,7 +418,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;