Merge "Fix SEGFAULT in profman"
am: 037b50ec79
Change-Id: Idb3f52cc1785d6f7d1c1f7cb17284db10d33bfe4
diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp
index fa23d3a..0fd2dd4 100644
--- a/cmds/installd/dexopt.cpp
+++ b/cmds/installd/dexopt.cpp
@@ -773,7 +773,8 @@
}
// program name, reference profile fd, the final NULL and the profile fds
- const char* argv[3 + profile_args.size() + apk_args.size() + (copy_and_update ? 1 : 0)];
+ const char* argv[3 + profile_args.size() + apk_args.size()
+ + dex_location_args.size() + (copy_and_update ? 1 : 0)];
int i = 0;
argv[i++] = profman_bin;
argv[i++] = reference_profile_arg.c_str();