mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Bug 1145389 - Add gralloc allocation requet size check r=nical
This commit is contained in:
parent
b47f624ddc
commit
dfcae94801
@ -213,7 +213,12 @@ bool SharedBufferManagerParent::RecvAllocateGrallocBuffer(const IntSize& aSize,
|
||||
|
||||
if (aFormat == 0 || aUsage == 0) {
|
||||
printf_stderr("SharedBufferManagerParent::RecvAllocateGrallocBuffer -- format and usage must be non-zero");
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (aSize.width <= 0 || aSize.height <= 0) {
|
||||
printf_stderr("SharedBufferManagerParent::RecvAllocateGrallocBuffer -- requested gralloc buffer size is invalid");
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the requested size is too big (i.e. exceeds the commonly used max GL texture size)
|
||||
|
Loading…
Reference in New Issue
Block a user