Update 2:
I've traced the problem to the following piece of code:
void Grouper::IsolatedInitialize(const NameValuePairs ¶meters)
{
m_groupSize = parameters.GetIntValueWithDefault(Name::GroupSize(), 0);
ConstByteArrayParameter separator, terminator;
if (m_groupSize)
parameters.GetRequiredParameter("Grouper", Name::Separator(), separator);
else
parameters.GetValue(Name::Separator(), separator); <--- THIS IS THE PROBLEM.
parameters.GetValue(Name::Terminator(), terminator);
m_separator.Assign(separator.begin(), separator.size());
m_terminator.Assign(terminator.begin(), terminator.size());
m_counter = 0;
}
It seems that upon return of the marked line above, separator's m_size member equals 3435973836..
I guess a Crypto++ library expert is required here..
From: [EMAIL PROTECTED]
To: [email protected]
Subject: RE: HexEncoder causes unhandled exception
Date: Sun, 28 May 2006 23:26:47 +0200
Update:
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
