Fix idmap calls when a subdir is present.

We need to increase the size of argv so that the last one remains
a NULL.

Bug: 32202741
Change-Id: I6636b5401fa7a61686a48c9a99b3e54e596033f9
This commit is contained in:
Jakub Adamek
2016-10-20 15:07:57 +01:00
parent f58948fc04
commit 56b9987ed7

View File

@@ -175,7 +175,7 @@ static void verifySystemIdmaps()
}
// Generic idmap parameters
const char* argv[7];
const char* argv[8];
int argc = 0;
struct stat st;
@@ -203,7 +203,7 @@ static void verifySystemIdmaps()
// Finally, invoke idmap (if any overlay directory exists)
if (argc > 5) {
execv(AssetManager::IDMAP_BIN, (char* const*)argv);
ALOGE("failed to execl for idmap: %s", strerror(errno));
ALOGE("failed to execv for idmap: %s", strerror(errno));
exit(1); // should never get here
} else {
exit(0);