Fix a bunch of small system/core bugs.
Missing frees in:
adb/file_sync_client.c
fastboot/fastboot.c
libsparse/output_file.c
Missing closedirs in:
adb/file_sync_service.c
cpio/mkbootfs.c
libcutils/dir_hash.c
Potential buffer overrun in:
gpttool/gpttool.c
Incorrect NULL check in:
libsparse/backed_block.c
Bug: https://code.google.com/p/android/issues/detail?id=61564
Change-Id: If97838a9e73a77aef7f416c31c237ce1fca4ce21
diff --git a/gpttool/gpttool.c b/gpttool/gpttool.c
index 05d5177..d3f08fe 100644
--- a/gpttool/gpttool.c
+++ b/gpttool/gpttool.c
@@ -161,7 +161,7 @@
{
struct efi_entry *entry = ptbl->entry;
unsigned n, m;
- char name[EFI_NAMELEN];
+ char name[EFI_NAMELEN + 1];
fprintf(stderr,"ptn start block end block name\n");
fprintf(stderr,"---- ------------- ------------- --------------------\n");