From 62d0f901fd7cfe70a09659aa58f631b479a16e35 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Wed, 5 Mar 2014 16:58:03 -0800 Subject: [PATCH] Don't pass in empty arg to dex2oat. We would occassionally pass in an empty arg "" instead of a NULL. This caused problems since dex2oat isn't made to handle empty args. (cherry picked from commit f53dbfeda39c290ed67b0682d559a80cb42ceb79) Change-Id: Ia2d60b895391bf83b5d250c20ddb8a4917d347a6 --- cmds/installd/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index f8f078c77..a167be06c 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -623,7 +623,7 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name, execl(DEX2OAT_BIN, DEX2OAT_BIN, zip_fd_arg, zip_location_arg, oat_fd_arg, oat_location_arg, - dex2oat_flags, + strlen(dex2oat_flags) > 0 ? dex2oat_flags : NULL, (char*) NULL); ALOGE("execl(%s) failed: %s\n", DEX2OAT_BIN, strerror(errno)); }