summaryrefslogtreecommitdiff
path: root/libs/androidfw/ObbFile.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-10-29 13:12:55 -0700
committerElliott Hughes <enh@google.com>2013-10-29 13:12:55 -0700
commitc367d48c55e5a3fa0df14fd62889e4bb6b63cb01 (patch)
treecc6a7e56e5c5e74d66603c8170660fd99c52bff3 /libs/androidfw/ObbFile.cpp
parentb4cae4a955ebd91cf35aaeb00ab12ce6f1d5fc48 (diff)
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
Diffstat (limited to 'libs/androidfw/ObbFile.cpp')
-rw-r--r--libs/androidfw/ObbFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/androidfw/ObbFile.cpp b/libs/androidfw/ObbFile.cpp
index 21e06c8db5cd..ec59f0666c02 100644
--- a/libs/androidfw/ObbFile.cpp
+++ b/libs/androidfw/ObbFile.cpp
@@ -133,7 +133,7 @@ bool ObbFile::parseObbFile(int fd)
{
lseek64(fd, fileLength - kFooterTagSize, SEEK_SET);
- char *footer = new char[kFooterTagSize];
+ char footer[kFooterTagSize];
actual = TEMP_FAILURE_RETRY(read(fd, footer, kFooterTagSize));
if (actual != kFooterTagSize) {
ALOGW("couldn't read footer signature: %s\n", strerror(errno));