Sfoglia il codice sorgente

fix: tinycrypt的hmac.c应该使用定长数组

Wendal Chen 1 anno fa
parent
commit
1bce414980
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/bt/blehost/ext/tinycrypt/src/hmac.c

+ 1 - 1
src/bt/blehost/ext/tinycrypt/src/hmac.c

@@ -61,7 +61,7 @@ int tc_hmac_set_key(TCHmacState_t ctx, const uint8_t *key,
         return TC_CRYPTO_FAIL;
     }
 
-    const uint8_t dummy_key[key_size];
+    const uint8_t dummy_key[1024];
     struct tc_hmac_state_struct dummy_state;
 
     if(key_size <= TC_SHA256_BLOCK_SIZE) {