mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Use nothrow new when allocating memory for zip file data
This commit is contained in:
committed by
Marshall Greenblatt
parent
26e30b3859
commit
0c6c44ba0b
@@ -33,7 +33,7 @@ class CefZipFile : public CefZipArchive::File {
|
|||||||
CefZipFile& operator=(const CefZipFile&) = delete;
|
CefZipFile& operator=(const CefZipFile&) = delete;
|
||||||
|
|
||||||
bool Initialize(size_t data_size) {
|
bool Initialize(size_t data_size) {
|
||||||
data_.reset(new unsigned char[data_size]);
|
data_.reset(new (std::nothrow) unsigned char[data_size]);
|
||||||
if (data_) {
|
if (data_) {
|
||||||
data_size_ = data_size;
|
data_size_ = data_size;
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user