From bcb5ff5ed9f0d28637ccf6432d3e68f1f23cbfb3 Mon Sep 17 00:00:00 2001 From: Kareem Date: Tue, 24 May 2022 13:20:52 -0700 Subject: [PATCH] Increase MAX_ECC_STRING to include the trailing \0 for longer order strings (in eg. SECP160R1). Note that this now matches the check in wc_EccPublicKeyDecode. --- wolfssl/wolfcrypt/ecc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfssl/wolfcrypt/ecc.h b/wolfssl/wolfcrypt/ecc.h index d0defd94b..e4676f593 100644 --- a/wolfssl/wolfcrypt/ecc.h +++ b/wolfssl/wolfcrypt/ecc.h @@ -293,7 +293,7 @@ typedef struct ecc_set_type { } ecc_set_type; #else #define MAX_ECC_NAME 16 -#define MAX_ECC_STRING ((MAX_ECC_BYTES * 2) + 1) +#define MAX_ECC_STRING ((MAX_ECC_BYTES * 2) + 2) /* The values are stored as text strings. */ typedef struct ecc_set_type {