mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 943505 - Use fallible allocation in nsZipItemPtr_base::nsZipItemPtr_base. r=bsmedberg
This commit is contained in:
parent
fcec562803
commit
e6cca8fcf7
@ -1128,7 +1128,10 @@ nsZipItemPtr_base::nsZipItemPtr_base(nsZipArchive *aZip, const char * aEntryName
|
||||
uint32_t size = 0;
|
||||
if (item->Compression() == DEFLATED) {
|
||||
size = item->RealSize();
|
||||
mAutoBuf = new uint8_t[size];
|
||||
mAutoBuf = new ((fallible_t())) uint8_t[size];
|
||||
if (!mAutoBuf) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
nsZipCursor cursor(item, aZip, mAutoBuf, size, doCRC);
|
||||
|
Loading…
Reference in New Issue
Block a user