File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2163,10 +2163,10 @@ int test_wc_PKCS7_DecodeEnvelopedData_multiple_recipients(void)
21632163 byte decodedData [8192 ];
21642164
21652165 ExpectTrue ((f = XFOPEN (testFile , "rb" )) != XBADFILE );
2166- testDerBufferSz = XFREAD (testDerBuffer , 1 ,
2167- sizeof (testDerBuffer ), f );
2168- ExpectIntNE (testDerBufferSz , 0 );
21692166 if (f != XBADFILE ) {
2167+ testDerBufferSz = XFREAD (testDerBuffer , 1 ,
2168+ sizeof (testDerBuffer ), f );
2169+ ExpectIntGT (testDerBufferSz , 0 );
21702170 XFCLOSE (f );
21712171 f = XBADFILE ;
21722172 }
@@ -2188,6 +2188,7 @@ int test_wc_PKCS7_DecodeEnvelopedData_multiple_recipients(void)
21882188 ExpectIntGT (ret , 0 );
21892189 #endif
21902190 wc_PKCS7_Free (pkcs7 );
2191+ pkcs7 = NULL ;
21912192 }
21922193
21932194 /* test with client cert recipient */
@@ -2207,6 +2208,7 @@ int test_wc_PKCS7_DecodeEnvelopedData_multiple_recipients(void)
22072208 ExpectIntGT (ret , 0 );
22082209 #endif
22092210 wc_PKCS7_Free (pkcs7 );
2211+ pkcs7 = NULL ;
22102212 }
22112213
22122214 /* test with ca cert recipient (which should fail) */
@@ -2222,6 +2224,7 @@ int test_wc_PKCS7_DecodeEnvelopedData_multiple_recipients(void)
22222224 (word32 )testDerBufferSz , decodedData , sizeof (decodedData ));
22232225 ExpectIntLT (ret , 0 );
22242226 wc_PKCS7_Free (pkcs7 );
2227+ pkcs7 = NULL ;
22252228 }
22262229
22272230 return EXPECT_RESULT ();
You can’t perform that action at this time.
0 commit comments