summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2011-10-31 14:07:54 -0700
committerStephen Hines <srhines@google.com>2011-10-31 15:42:40 -0700
commita049184274b88dd86a1f2e4e7d16a7553153dbb1 (patch)
tree46f5f6f23118230ba326afcd48788c67c6494084
parentaeb11b598877523fd3c530c7a086c38b4a13c7a1 (diff)
downloadbase-a049184274b88dd86a1f2e4e7d16a7553153dbb1.tar.gz
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
-rw-r--r--libs/rs/rsContext.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 948ecf90a732..5291a1f73f2e 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) {