From 56b9987ed749639fb3fae7f90422797c29ed1312 Mon Sep 17 00:00:00 2001 From: Jakub Adamek Date: Thu, 20 Oct 2016 15:07:57 +0100 Subject: [PATCH] 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 --- core/jni/android_util_AssetManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp index 52b7ef4f7fa3..7aab58cf1319 100644 --- a/core/jni/android_util_AssetManager.cpp +++ b/core/jni/android_util_AssetManager.cpp @@ -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); -- 2.11.0