aboutsummaryrefslogtreecommitdiffstats
path: root/minui
diff options
context:
space:
mode:
authorAlistair Strachan2017-04-28 17:05:33 -0500
committerTao Bao2017-04-28 18:13:02 -0500
commit4697d8b11b259a8dbed5998381265f7010eb6318 (patch)
tree271bd30c7db105925f0a8689bde1e8703933ae1b /minui
parent0481faef77bf87e1c44b787c4aaf92e57cccf988 (diff)
downloadplatform-bootable-recovery-4697d8b11b259a8dbed5998381265f7010eb6318.tar.gz
platform-bootable-recovery-4697d8b11b259a8dbed5998381265f7010eb6318.tar.xz
platform-bootable-recovery-4697d8b11b259a8dbed5998381265f7010eb6318.zip
minui: Fix breakage in graphics_adf.
When graphics_adf was refactored in 557fa1f, a class member was introduced that was not initialized to zero. This meant that the first time Flip() was called, current_surface would have a junk value and cause a bad pointer rereference, crashing recovery. Make sure current_surface is initialized to 0 for the first Flip(). Test: Ran recovery on a device using the ADF backend. Change-Id: I9b8fac0a4d48cac990e5e9808a071c232de1ebfb
Diffstat (limited to 'minui')
-rw-r--r--minui/graphics_adf.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/minui/graphics_adf.cpp b/minui/graphics_adf.cpp
index 1b15a04f..a59df00c 100644
--- a/minui/graphics_adf.cpp
+++ b/minui/graphics_adf.cpp
@@ -28,7 +28,8 @@
28 28
29#include "minui/minui.h" 29#include "minui/minui.h"
30 30
31MinuiBackendAdf::MinuiBackendAdf() : intf_fd(-1), dev(), n_surfaces(0), surfaces() {} 31MinuiBackendAdf::MinuiBackendAdf()
32 : intf_fd(-1), dev(), current_surface(0), n_surfaces(0), surfaces() {}
32 33
33int MinuiBackendAdf::SurfaceInit(const drm_mode_modeinfo* mode, GRSurfaceAdf* surf) { 34int MinuiBackendAdf::SurfaceInit(const drm_mode_modeinfo* mode, GRSurfaceAdf* surf) {
34 *surf = {}; 35 *surf = {};