зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1318007: When the surface is already allocated, just check for non-positive dimensions. r=aosmond
MozReview-Commit-ID: C0Fkq1SVO3s --HG-- extra : rebase_source : 9b927993272338b811c49746d64077fc265cbb85
This commit is contained in:
Родитель
9c80f7b6f2
Коммит
4f7e0ff668
|
@ -770,7 +770,10 @@ Factory::CreateWrappingDataSourceSurface(uint8_t *aData,
|
|||
SourceSurfaceDeallocator aDeallocator /* = nullptr */,
|
||||
void* aClosure /* = nullptr */)
|
||||
{
|
||||
if (!AllowedSurfaceSize(aSize)) {
|
||||
// Just check for negative/zero size instead of the full AllowedSurfaceSize() - since
|
||||
// the data is already allocated we do not need to check for a possible overflow - it
|
||||
// already worked.
|
||||
if (aSize.width <= 0 || aSize.height <= 0) {
|
||||
return nullptr;
|
||||
}
|
||||
if (!aDeallocator && aClosure) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче