Skip to content

Commit 726e702

Browse files
author
Andras Fekete
committed
Uninitialized variable because we don't check return value
Warning 544870.5627882
1 parent ac81d9d commit 726e702

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

wolfcrypt/src/pkcs7.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11489,8 +11489,13 @@ int wc_PKCS7_EncodeAuthEnvelopedData(PKCS7* pkcs7, byte* output,
1148911489
return MEMORY_E;
1149011490
}
1149111491

11492-
FlattenAttributes(pkcs7, flatAuthAttribs, authAttribs,
11492+
ret = FlattenAttributes(pkcs7, flatAuthAttribs, authAttribs,
1149311493
authAttribsCount);
11494+
if (ret != 0) {
11495+
wc_PKCS7_FreeEncodedRecipientSet(pkcs7);
11496+
XFREE(flatAuthAttribs, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
11497+
return ret;
11498+
}
1149411499

1149511500
authAttribsSetSz = SetImplicit(ASN_SET, 1, authAttribsSz,
1149611501
authAttribSet);

0 commit comments

Comments
 (0)