From 4019c36f52ad379ddd861b6517f721ddd67af95b Mon Sep 17 00:00:00 2001 From: altucor <31515257+altucor@users.noreply.github.com> Date: Wed, 24 Feb 2021 18:22:57 +0200 Subject: [PATCH] Fixed size of memory buffers You're defines have values which represents value size in bits, but in real you need to specify size of bytes allocated in memory buffer --- srp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srp.h b/srp.h index acf71b8..0028316 100644 --- a/srp.h +++ b/srp.h @@ -66,10 +66,10 @@ extern "C" { #define SRP_H #define SHA1_DIGEST_LENGTH 20 -#define SHA224_DIGEST_LENGTH 224 -#define SHA256_DIGEST_LENGTH 256 -#define SHA384_DIGEST_LENGTH 384 -#define SHA512_DIGEST_LENGTH 512 +#define SHA224_DIGEST_LENGTH 28 +#define SHA256_DIGEST_LENGTH 32 +#define SHA384_DIGEST_LENGTH 48 +#define SHA512_DIGEST_LENGTH 64 #define BIGNUM mbedtls_mpi struct SRPVerifier; struct SRPUser;