Skip to content

Commit 3a7ede0

Browse files
chrisforbesandi34
authored andcommitted
ui: Fix bad size check in Fence::unflatten
Differs slightly from mnc+ patch: GetFlattenedSize was fixed in mnc. Test: Boot device, run poc from bug, observe no longer crashes Bug: 3728568 AOSP-Change-Id: Id8b851733b088cce0d07493fbf76e7e24f9299ad (cherry picked from commit 9809602) Change-Id: I82dd3b0504763c9213ca56b33790b7faa17bb9ad
1 parent 5a8338e commit 3a7ede0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/ui/Fence.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ status_t Fence::unflatten(void const*& buffer, size_t& size, int const*& fds, si
152152
return INVALID_OPERATION;
153153
}
154154

155-
if (size < 1) {
155+
if (size < getFlattenedSize()) {
156156
return NO_MEMORY;
157157
}
158158

0 commit comments

Comments
 (0)