From c367d48c55e5a3fa0df14fd62889e4bb6b63cb01 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 29 Oct 2013 13:12:55 -0700 Subject: Fix a variety of small publicly-reported bugs. Possible NULL dereference in cmds/bootanimation/BootAnimation.cpp. https://code.google.com/p/android/issues/detail?id=61556 Missing fclose in core/jni/android_os_Debug.cpp. https://code.google.com/p/android/issues/detail?id=61546 Bad loop guards in core/jni/android_util_Process.cpp. https://code.google.com/p/android/issues/detail?id=61557 Assignment to wrong variable in libs/androidfw/AssetManager.cpp. https://code.google.com/p/android/issues/detail?id=61560 Missing delete[]s in libs/androidfw/ObbFile.cpp. https://code.google.com/p/android/issues/detail?id=61549 Leaks on error in tools/aapt/Images.cpp. https://code.google.com/p/android/issues/detail?id=61552 Two missing fclose calls in tools/aapt/Resource.cpp. https://code.google.com/p/android/issues/detail?id=61553 Missing fclose in tools/aidl/aidl.cpp. https://code.google.com/p/android/issues/detail?id=61554 Change-Id: I5820f3824e72d07a9acb776cf0af3e7443f5694a --- cmds/bootanimation/BootAnimation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmds/bootanimation/BootAnimation.cpp') diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 8511735a15a7..cc49cf3b61e6 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -159,8 +159,8 @@ status_t BootAnimation::initTexture(void* buffer, size_t len) SkBitmap bitmap; SkMemoryStream stream(buffer, len); SkImageDecoder* codec = SkImageDecoder::Factory(&stream); - codec->setDitherImage(false); if (codec) { + codec->setDitherImage(false); codec->decode(&stream, &bitmap, SkBitmap::kARGB_8888_Config, SkImageDecoder::kDecodePixels_Mode); @@ -270,7 +270,7 @@ status_t BootAnimation::readyToRun() { mAndroidAnimation = true; - // If the device has encryption turned on or is in process + // If the device has encryption turned on or is in process // of being encrypted we show the encrypted boot animation. char decrypt[PROPERTY_VALUE_MAX]; property_get("vold.decrypt", decrypt, ""); -- cgit v1.2.3-59-g8ed1b