Browse Source

fix: crypto使用了mempcpy方法,没必要,改memcpy

Wendal Chen 4 years ago
parent
commit
12b82eddde
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/port/luat_crypto_air101.c

+ 1 - 1
app/port/luat_crypto_air101.c

@@ -282,7 +282,7 @@ int l_crypto_cipher_xxx(lua_State *L, uint8_t flags) {
 
 
     if (!strcmp("AES-128-CBC", cipher)) {
     if (!strcmp("AES-128-CBC", cipher)) {
         luaL_buffinitsize(L, &buff, str_size);
         luaL_buffinitsize(L, &buff, str_size);
-        mempcpy(buff.b, str, str_size);
+        memcpy(buff.b, str, str_size);
         if (flags) {
         if (flags) {
             ret = aes_128_cbc_encrypt((const u8*)key, (const u8*)iv, (u8*)buff.b, str_size);
             ret = aes_128_cbc_encrypt((const u8*)key, (const u8*)iv, (u8*)buff.b, str_size);
         }
         }