瀏覽代碼

Ensure that `stat` is initialized.

Signed-off-by: Steffen Jaeckel <[email protected]>
Steffen Jaeckel 4 周之前
父節點
當前提交
65a7e83e05
共有 1 個文件被更改,包括 2 次插入0 次删除
  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)