mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
fix 240522 ABR when using filters on custom header and header line is long, sr=mscott
This commit is contained in:
parent
cbff87291f
commit
a932a4ee93
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user