MD5 for file crashing


#1
File appFile (T("c:\\devel\\sony.jfont"));
MD5 fMd5(appFile);

the file exists and is ok, but when the MD5 class does it’s processStream (InputStream& input, int64 numBytesToRead) method it crashes, i checked the debugger and it crashes in thhe MD5::ProcessContext::finish method at line

processBlock (encodedLength, 8);

the error is hhere

 inline uint32 ByteOrder::littleEndianInt (const char* const bytes)			 { return *(uint32*) bytes; }

#2

Ah yes, sorry - looks like a signed/unsigned maths overflow. Thanks, I’ll post a fix shortly…