Galo Vinueza S.
unread,Feb 25, 2012, 9:38:07 AM2/25/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Crypto++ Users
Hello, i have a memory leak, using VS 2008 and a static version of the
library, the code is as follow:
//make room for the biggest 4096 bits
BYTE bPriv[2400];
BYTE bPub[600];
DWORD dwPubSize = 0;
DWORD dwPrivSize = 0;
ZeroMemory(bPriv, 2400);
ZeroMemory(bPub, 600);
try
{
ArraySink arrPriv(bPriv, 2400);
ArraySink arrPub(bPub, 600);
AutoSeededRandomPool _random;
RSAES_OAEP_SHA_Decryptor _priv(_random, nKeyLength);
_priv.DEREncode(arrPriv);
RSAES_OAEP_SHA_Encryptor _pub(_priv);
_pub.DEREncode(arrPub);
dwPubSize = (DWORD)arrPub.TotalPutLength();
dwPrivSize = (DWORD)arrPriv.TotalPutLength();
}
catch (...){}
....some more code using the bPriv and bPub buffers....
after executing this code, i end up with a memory leak, PLEASE if i'm
doing something wrong here, let me know.
Saludos, Galo.