fix 240522 ABR when using filters on custom header and header line is long, sr=mscott

This commit is contained in:
bienvenu%nventure.com 2004-04-14 20:05:41 +00:00
parent cbff87291f
commit a932a4ee93

View File

@ -169,6 +169,8 @@ PRInt32 nsMsgBodyHandler::GetNextFilterLine(char * buf, PRUint32 bufSize)
{
numBytesCopied = strlen(m_headers)+1 /* + 1 to include NULL */ < bufSize ? strlen(m_headers)+1 : (PRInt32) bufSize;
memcpy(buf, m_headers, numBytesCopied);
if (numBytesCopied == bufSize)
buf[bufSize - 1] = '\0';
m_headers += numBytesCopied;
// be careful...m_headersSize is unsigned. Don't let it go negative or we overflow to 2^32....*yikes*
if (m_headersSize < numBytesCopied)