mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 393630 - "Potential crash on oom in GenerateAlternativeString" [p=masayuki@d-toybox.com (Masayuki Nakano) r=stuart a1.9=damons]
This commit is contained in:
parent
708ae9b606
commit
ce7094da13
@ -1443,6 +1443,8 @@ private:
|
|||||||
if (mAlternativeString)
|
if (mAlternativeString)
|
||||||
free(mAlternativeString);
|
free(mAlternativeString);
|
||||||
mAlternativeString = (PRUnichar *)malloc(mRangeLength * sizeof(PRUnichar));
|
mAlternativeString = (PRUnichar *)malloc(mRangeLength * sizeof(PRUnichar));
|
||||||
|
if (!mAlternativeString)
|
||||||
|
return;
|
||||||
memcpy((void *)mAlternativeString, (const void *)mRangeString,
|
memcpy((void *)mAlternativeString, (const void *)mRangeString,
|
||||||
mRangeLength * sizeof(PRUnichar));
|
mRangeLength * sizeof(PRUnichar));
|
||||||
for (PRUint32 i = 0; i < mRangeLength; i++) {
|
for (PRUint32 i = 0; i < mRangeLength; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user