summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-03-05 16:58:03 -0800
committerMathieu Chartier <mathieuc@google.com>2014-03-05 16:58:48 -0800
commitf53dbfeda39c290ed67b0682d559a80cb42ceb79 (patch)
tree8b7eda08854f5c69f5bfcf3cc8c9f07ba9e27064
parente19c99aad605c395f53bf39ae1a27e298e7e33ce (diff)
downloadnative-f53dbfeda39c290ed67b0682d559a80cb42ceb79.tar.gz
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. Change-Id: Ibb1aed64a4aa17459b2a75a5a2abcf13c7fa8ac7
-rw-r--r--cmds/installd/commands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index f8f078c771..a167be06c3 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));
}