mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 562528 - comparison between signed and unsigned integer expressions in nsEscapeHTML2, r=bsmedberg
--HG-- extra : rebase_source : 995cb88bc3bdb692ea154be2ebee597b0f777e58
This commit is contained in:
parent
892951ebdb
commit
f183d85605
@ -289,12 +289,12 @@ NS_COM PRUnichar *
|
||||
nsEscapeHTML2(const PRUnichar *aSourceBuffer, PRInt32 aSourceBufferLen)
|
||||
{
|
||||
// if the caller didn't calculate the length
|
||||
if (aSourceBufferLen == -1) {
|
||||
if (aSourceBufferLen < 0) {
|
||||
aSourceBufferLen = nsCRT::strlen(aSourceBuffer); // ...then I will
|
||||
}
|
||||
|
||||
/* XXX Hardcoded max entity len. */
|
||||
if (aSourceBufferLen >=
|
||||
if (PRUint32(aSourceBufferLen) >=
|
||||
((PR_UINT32_MAX - sizeof(PRUnichar)) / (6 * sizeof(PRUnichar))) )
|
||||
return nsnull;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user