summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceControl.cpp
diff options
context:
space:
mode:
author Robert Carr <racarr@google.com> 2022-03-22 15:25:54 -0700
committer Robert Carr <racarr@google.com> 2022-03-22 15:25:54 -0700
commitc2cf02c17af0d7e5f58b8a17ecb9cfcc91a4d2eb (patch)
treee07f6e039b036d9e65f72c5978754dcc8a4ed453 /libs/gui/SurfaceControl.cpp
parentf4b49765605223dba7b804c351a98a3c6bb676f9 (diff)
SurfaceControl: Ensure unused fields are zeroed
Otherwise we could leak uninitialized memory to an untrusted process. Bug: 214999987 Test: Existing tests pass Change-Id: I87993fbb920b3af938a311e6afc15383d571823a
Diffstat (limited to 'libs/gui/SurfaceControl.cpp')
-rw-r--r--libs/gui/SurfaceControl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp
index 063dda5153..654fb336fe 100644
--- a/libs/gui/SurfaceControl.cpp
+++ b/libs/gui/SurfaceControl.cpp
@@ -70,6 +70,7 @@ SurfaceControl::SurfaceControl(const sp<SurfaceControl>& other) {
mLayerId = other->mLayerId;
mWidth = other->mWidth;
mHeight = other->mHeight;
+ mFormat = other->mFormat;
mCreateFlags = other->mCreateFlags;
}