From c2cf02c17af0d7e5f58b8a17ecb9cfcc91a4d2eb Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Tue, 22 Mar 2022 15:25:54 -0700 Subject: 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 --- libs/gui/SurfaceControl.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'libs/gui/SurfaceControl.cpp') 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& other) { mLayerId = other->mLayerId; mWidth = other->mWidth; mHeight = other->mHeight; + mFormat = other->mFormat; mCreateFlags = other->mCreateFlags; } -- cgit v1.2.3-59-g8ed1b