diff options
author | Mathias Agopian <mathias@google.com> | 2009-07-09 18:16:43 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-07-09 18:16:43 -0700 |
commit | 6e2d6483fe14362187c78c91dc03024fbb31d431 (patch) | |
tree | df97d1dbb309485d0c9bfa1360b80b7bcef9b8c5 /libs | |
parent | 7278a129fc7028241e579dff199e76c683e615c7 (diff) | |
download | frameworks_native-6e2d6483fe14362187c78c91dc03024fbb31d431.zip frameworks_native-6e2d6483fe14362187c78c91dc03024fbb31d431.tar.gz frameworks_native-6e2d6483fe14362187c78c91dc03024fbb31d431.tar.bz2 |
fix for [1885684] E/SurfaceFlinger( 60): not enough memory for layer bitmap size=4294938624
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaceflinger/SurfaceFlinger.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp index ef4a8ea..fb25663 100644 --- a/libs/surfaceflinger/SurfaceFlinger.cpp +++ b/libs/surfaceflinger/SurfaceFlinger.cpp @@ -1236,6 +1236,13 @@ sp<ISurface> SurfaceFlinger::createSurface(ClientID clientId, int pid, { LayerBaseClient* layer = 0; sp<LayerBaseClient::Surface> surfaceHandle; + + if (int32_t(w|h) < 0) { + LOGE("createSurface() failed, w or h is negative (w=%d, h=%d)", + int(w), int(h)); + return surfaceHandle; + } + Mutex::Autolock _l(mStateLock); Client* const c = mClientsMap.valueFor(clientId); if (UNLIKELY(!c)) { |