ソースを参照

Merge pull request #7370 from anhu/quickie

sizeof(oriType) ---> sizeof(asnDataOid)
Daniel Pouzzner 1 ヶ月 前
コミット
716870cbc2
1 ファイル変更3 行追加1 行削除
  1. 3 1
      wolfcrypt/test/test.c

+ 3 - 1
wolfcrypt/test/test.c

@@ -41748,7 +41748,9 @@ static int myOriEncryptCb(PKCS7* pkcs7, byte* cek, word32 cekSz, byte* oriType,
     int i;
 
     /* make sure buffers are large enough */
-    if ((*oriValueSz < (2 + cekSz)) || (*oriTypeSz < sizeof(oriType)))
+    if (*oriValueSz < (2 + cekSz))
+        return WC_TEST_RET_ENC_NC;
+    if (*oriTypeSz < sizeof(asnDataOid))
         return WC_TEST_RET_ENC_NC;
 
     /* our simple encryption algorithm will be take the bitwise complement */