frameworks/native
Revisión | 3b4d3a5dd42a2806847da8b8e0486cd0d15e15d0 (tree) |
---|---|
Tiempo | 2020-06-01 23:43:52 |
Autor | Tong Bo <bo.tong@inte...> |
Commiter | Chih-Wei Huang |
Make DisplayInfo struct packed
When DisplayInfo is handled through binder transaction, especially
between a 32-bit client and 64-bit service, it may have different
size and client will receive incorrect values. Make this struct packed
and so it will keep the same size.
Change-Id: Ia0a9afb28ba2c9a2fc581f3ae544e3ea2b3fe419
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-67302
Signed-off-by: Tong Bo <bo.tong@intel.com>
@@ -24,7 +24,7 @@ | ||
24 | 24 | |
25 | 25 | namespace android { |
26 | 26 | |
27 | -struct DisplayInfo { | |
27 | +struct __attribute__ ((__packed__)) DisplayInfo { | |
28 | 28 | uint32_t w{0}; |
29 | 29 | uint32_t h{0}; |
30 | 30 | float xdpi{0}; |