Hi all,

I'm having a problem using crypto++ 5.5.2 as a replacement for 5.1 in
an existing application. I did debug into the application and found
the following:

The application gets caught in an infinite loop in files.cpp Line 67
to 84. Code is:

        while (size && m_stream->good())
        {
                {
                size_t spaceSize = 1024;
                m_space = HelpCreatePutSpace(target, channel, 1,
UnsignedMin(size_t(0)-1, size), spaceSize);

                m_stream->read((char *)m_space, (unsigned int)STDMIN(size,
(lword)spaceSize));
                }
                m_len = m_stream->gcount();
                size_t blockedBytes;
output:
                blockedBytes = target.ChannelPutModifiable2(channel, m_space, 
m_len,
0, blocking);
                m_waiting = blockedBytes > 0;
                if (m_waiting)
                        return blockedBytes;
                size -= m_len;
                transferBytes += m_len;
        }

size is passed from cryptlib.cpp line 402 and initialized to LWORD_MAX
in line 401. blocking=true is passed to the TransferTo2 function.

Apparently blockedBytes never is > 0 and m_stream->gcount();
eventually reaches 0 leaving the application stuck in an infinite
loop. Lead up to the problem is an attempt to read a private key from
a file, therefore constructing a FileSource on the file.

Did anyone ever see such a problem or has a clue for me to get around
that problem?

Regards
Tom

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to