Switching to VS 2003 cured the problem.. somewhat.
I still have problems with the HexEncoder though. If I use StringSink as the destination for the RSA key, I get an unhandled exception when the stack is unwound. If I use FileSink or ArraySink everything is fine. The length of the key in hex-format is only around 350 or so and therefore it shouldn't be a problem with the maximum length of the std::string.
string hexKey;
HexEncoder encoder(new StringSink(hexKey)); <-- this triggers an assertion in debug mode or an unhandled exception in release mode
// HexEncoder encoder(new FileSink("rsa_output.txt)); <-- this works
m_pPublicKey->DEREncode(encoder);
encoder.MessageEnd();
Something is definitely wrong with the HexEncoder class and someone should have a look.. soon!
Is anybody alive in here at all !?
From: [EMAIL PROTECTED]
To: [email protected]
Subject: RE: HexEncoder causes unhandled exception
Date: Wed, 31 May 2006 12:19:31 +0200
I have already tried to compile the latest CVS sources and the same error occurs. I even tried the following which seems to have cleared up the redundant warnings when compiling in VS 2005:
http://www.ibiblio.org/weidai/cryptopp_20060419.zip
It cannot be right that you shouldn't use VS 2005 in order to use Crypto++ :/
Subject: RE: HexEncoder causes unhandled exception
Date: Wed, 31 May 2006 11:54:26 +0100
From: [EMAIL PROTECTED]
To: [email protected]
Hi,You probably know that you can only use the latest cvs sources with VS 2005? CryptoPP 5.2.3 is not VS2005 compliant.Best regards,Marko
Update:
From: Søren Dreijer [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 28, 2006 10:27 PM
To: [email protected]
Subject: RE: HexEncoder causes unhandled exception
If I run the project in Release mode, no exception occurs. However, as soon as I switch to debug mode the application crashes!
I should probably also point out that I'm using Visual Studio 2005. When I abort the program after the exception, the following line is present in the debugger's Output window:
"HEAP[Test.exe]: Invalid allocation size - CCCCCCCC (exceeded 7ffdefff)"
It is clear from the stack trace that the memcpy() call is trying to copy an invalid number of bytes (3435973836) and thus causes an exception. The question is just what causes this...
Help. Please!
From: [EMAIL PROTECTED]
To: [email protected]
Subject: HexEncoder causes unhandled exception
Date: Sun, 28 May 2006 22:27:30 +0200
And I'm back.
It seems there is a problem with HexEncoder. Whenever I try to create an instance of the class I get an unhandled exception. I'm using version 5.2.3 of the library.
Below is shown a stack trace:
cryptopp.dll!memcpy(unsigned char * dst=0x00000000, unsigned char * src=0x0012f6c4, unsigned long count=3435973836) Line 188 Asm
cryptopp.dll!CryptoPP::SecBlock<unsigned char,CryptoPP::AllocatorWithCleanup<unsigned char> >::Assign(const unsigned char * t=0x0012f6c4, unsigned int len=0) Line 280 + 0xd bytes C++
cryptopp.dll!CryptoPP::Grouper::IsolatedInitialize(const CryptoPP::NameValuePairs & parameters={...}) Line 201 C++
cryptopp.dll!CryptoPP::Filter::Initialize(const CryptoPP::NameValuePairs & parameters={...}, int propagation=-2) Line 65 C++
cryptopp.dll!CryptoPP::Filter::PropagateInitialize(const CryptoPP::NameValuePairs & parameters={...}, int propagation=-1) Line 99 + 0x15 bytes C++
cryptopp.dll!CryptoPP::Filter::Initialize(const CryptoPP::NameValuePairs & parameters={...}, int propagation=-1) Line 65 + 0xf bytes C++
cryptopp.dll!CryptoPP::HexEncoder::IsolatedInitialize(const CryptoPP::NameValuePairs & parameters={...}) Line 19 + 0x69 bytes C++
cryptopp.dll!CryptoPP::HexEncoder::HexEncoder(CryptoPP::BufferedTransformation * attachment=0x00000000, bool uppercase=true, int outputGroupSize=0, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & separator="ÌÌÌÌ:", const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & terminator="ÌÌÌÌ") Line 15 + 0x69 bytes C++
If anyone is still alive in this mailing list, please tell me what's going on here!
Express yourself instantly with MSN Messenger! MSN Messenger
Express yourself instantly with MSN Messenger! MSN Messenger
Express yourself instantly with MSN Messenger! MSN Messenger
Search on the go: Try Windows Live Search for Mobile beta
