Browse Source

Ensure that `stat` is initialized.

Signed-off-by: Steffen Jaeckel <[email protected]>
Steffen Jaeckel 3 weeks ago
parent
commit
65a7e83e05
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/pk/ecc/ecc_verify_hash.c

+ 2 - 0
src/pk/ecc/ecc_verify_hash.c

@@ -46,6 +46,8 @@ int ecc_verify_hash_v2(const unsigned char *sig,
                                        int *stat,
                        const       ecc_key *key)
 {
+   LTC_ARGCHK(stat != NULL);
+   *stat = 0;
    if (opts->type < 0 || opts->type >= LTC_ARRAY_SIZE(s_ecc_verify_hash))
       return CRYPT_PK_INVALID_TYPE;
    if (s_ecc_verify_hash[opts->type] == NULL)