mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 716556 - Fix possible buffer overflow with nsScriptableInputStream, r=bsmedberg
This commit is contained in:
parent
9f48a1240f
commit
8ffc9cabe7
@ -69,6 +69,9 @@ nsScriptableInputStream::Read(PRUint32 aCount, char **_retval) {
|
||||
|
||||
if (!mInputStream) return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
// bug716556 - Need room room for the null byte
|
||||
if (aCount > PR_UINT32_MAX - 1) return NS_ERROR_ILLEGAL_VALUE;
|
||||
|
||||
rv = mInputStream->Available(&count);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user