Skip to content

Commit a049184

Browse files
committed
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
1 parent aeb11b5 commit a049184

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libs/rs/rsContext.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ Context::Context() {
359359
mTargetSdkVersion = 14;
360360
mDPI = 96;
361361
mIsContextLite = false;
362+
memset(&watchdog, 0, sizeof(watchdog));
362363
}
363364

364365
Context * Context::createContext(Device *dev, const RsSurfaceConfig *sc) {

0 commit comments

Comments
 (0)