mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 881742: Fix null-deref on OOM (or bad allocation size due to corrupted video) in webrtc upstream code r=jesup
This commit is contained in:
parent
40212e3fb3
commit
ecc32f3948
@ -43,6 +43,11 @@ int Plane::MaybeResize(int new_size) {
|
||||
return 0;
|
||||
scoped_ptr<uint8_t, AlignedFreeDeleter> new_buffer(static_cast<uint8_t*>(
|
||||
AlignedMalloc(new_size, kBufferAlignment)));
|
||||
|
||||
if (!new_buffer.get()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (buffer_.get()) {
|
||||
memcpy(new_buffer.get(), buffer_.get(), plane_size_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user