summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-10-12 22:45:42 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-10-12 22:45:42 +0000
commitbe752e93a9fad1060d0c4b0ae6c01df71a96d964 (patch)
tree7ec9545b168cac2171514822fbd98ce2da5b728c
parent65becf9b1376ede0e34e3b23d20b9a7dd0d55eb5 (diff)
parente23933651a4ff6995d01b2b29cadfa4733106573 (diff)
downloadnative-be752e93a9fad1060d0c4b0ae6c01df71a96d964.tar.gz
Snap for 5066295 from e23933651a4ff6995d01b2b29cadfa4733106573 to pi-qpr2-release
Change-Id: I1e886e3c861aba799f66c8eaef967fa2f9180e2e
-rw-r--r--libs/ui/GraphicBuffer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp
index 254038b0ad..7670ac6fbd 100644
--- a/libs/ui/GraphicBuffer.cpp
+++ b/libs/ui/GraphicBuffer.cpp
@@ -377,6 +377,10 @@ status_t GraphicBuffer::flatten(void*& buffer, size_t& size, int*& fds, size_t&
status_t GraphicBuffer::unflatten(
void const*& buffer, size_t& size, int const*& fds, size_t& count) {
+ if (size < 12 * sizeof(int)) {
+ android_errorWriteLog(0x534e4554, "114223584");
+ return NO_MEMORY;
+ }
int const* buf = static_cast<int const*>(buffer);