From a049184274b88dd86a1f2e4e7d16a7553153dbb1 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Mon, 31 Oct 2011 14:07:54 -0700 Subject: [PATCH] Fix potential segfault in RS watchdog. BUG=5544671 This initializes the watchdog structure properly. Without this fix, it is possible to call LOGE with a garbage string value. Change-Id: Ie05eb65f83eca938f18ac962794407d58c3f277f --- libs/rs/rsContext.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 948ecf90a732e..5291a1f73f2e3 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -359,6 +359,7 @@ Context::Context() { mTargetSdkVersion = 14; mDPI = 96; mIsContextLite = false; + memset(&watchdog, 0, sizeof(watchdog)); } Context * Context::createContext(Device *dev, const RsSurfaceConfig *sc) {