OSDN Git Service
(root)
/
android-x86
/
frameworks-native.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ae83f4
)
ui: Fix bad size check in Fence::unflatten
author
Chris Forbes
<chrisforbes@google.com>
Wed, 10 May 2017 20:12:00 +0000
(13:12 -0700)
committer
Chris Forbes
<chrisforbes@google.com>
Tue, 16 May 2017 18:30:27 +0000
(18:30 +0000)
Differs slightly from mnc+ patch: GetFlattenedSize was fixed in mnc.
Test: Boot device, run poc from bug, observe no longer crashes
Bug:
37285689
Change-Id: Id8b851733b088cce0d07493fbf76e7e24f9299ad
libs/ui/Fence.cpp
patch
|
blob
|
history
diff --git
a/libs/ui/Fence.cpp
b/libs/ui/Fence.cpp
index
93ec0ce
..
2a77150
100644
(file)
--- a/
libs/ui/Fence.cpp
+++ b/
libs/ui/Fence.cpp
@@
-127,7
+127,7
@@
nsecs_t Fence::getSignalTime() const {
}
size_t Fence::getFlattenedSize() const {
- return
1
;
+ return
4
;
}
size_t Fence::getFdCount() const {
@@
-152,7
+152,7
@@
status_t Fence::unflatten(void const*& buffer, size_t& size, int const*& fds, si
return INVALID_OPERATION;
}
- if (size <
1
) {
+ if (size <
getFlattenedSize()
) {
return NO_MEMORY;
}