Skip to content

Commit

Permalink
try linux build mem leak using insert
Browse files Browse the repository at this point in the history
  • Loading branch information
gangatp committed Dec 12, 2023
1 parent bc47b4e commit 53e4f94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tests/CPP_Bindings/Source/UnitTest_EncryptionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ void EncryptionCallbacks::keyDecryptClientCallback(
|| Lib3MF::eDigestMethod::SHA1 != ar.GetDigestMethod())
*status = 0;
else if (nullptr == plainBuffer || 0 == plainSize) {
*plainNeeded = RsaMethods::getSize(context->key);
// plainNeeded should be bigger than the plain text size for padding cases to avoid mem leak.
*plainNeeded = RsaMethods::getSize(context->key) - 42;
*status = 32;
}
else {
Expand Down

0 comments on commit 53e4f94

Please sign in to comment.