зеркало из https://github.com/mozilla/pjs.git
fix 240522 ABR when using filters on custom header and header line is long, sr=mscott
This commit is contained in:
Родитель
3e71aa9262
Коммит
bce33ecb2f
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче