diff --git a/netwerk/streamconv/converters/nsBinHexDecoder.cpp b/netwerk/streamconv/converters/nsBinHexDecoder.cpp --- a/netwerk/streamconv/converters/nsBinHexDecoder.cpp +++ b/netwerk/streamconv/converters/nsBinHexDecoder.cpp @@ -197,20 +197,24 @@ nsresult nsBinHexDecoder::ProcessNextSta /* handle state */ switch (mState) { case BINHEX_STATE_START: mState = BINHEX_STATE_FNAME; mCount = 0; // c & 63 returns the length of mName. So if we need the length, that's how // you can figure it out.... mName.SetLength(c & 63); + if (mName.Length() != c & 63) { + /* XXX ProcessNextState/ProcessNextChunk aren't rv checked */ + mState = BINHEX_STATE_DONE; + } break; case BINHEX_STATE_FNAME: mName.BeginWriting()[mCount] = c; if (++mCount > mName.Length()) { // okay we've figured out the file name....set the content type on the channel // based on the file name AND issue our delayed on start request....