summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/aapt/Android.mk2
-rw-r--r--tools/aapt2/Util.cpp4
-rw-r--r--tools/split-select/Android.mk2
3 files changed, 5 insertions, 3 deletions
diff --git a/tools/aapt/Android.mk b/tools/aapt/Android.mk
index 68c2fe8f..ee26729 100644
--- a/tools/aapt/Android.mk
+++ b/tools/aapt/Android.mk
@@ -63,8 +63,8 @@ aaptHostLdLibs :=
aaptHostStaticLibs := \
libandroidfw \
libpng \
- liblog \
libutils \
+ liblog \
libcutils \
libexpat \
libziparchive-host \
diff --git a/tools/aapt2/Util.cpp b/tools/aapt2/Util.cpp
index 03ecd1a..5b064e3 100644
--- a/tools/aapt2/Util.cpp
+++ b/tools/aapt2/Util.cpp
@@ -303,8 +303,10 @@ std::string utf16ToUtf8(const StringPiece16& utf16) {
}
std::string utf8;
+ // Make room for '\0' explicitly.
+ utf8.resize(utf8Length + 1);
+ utf16_to_utf8(utf16.data(), utf16.length(), &*utf8.begin(), utf8Length + 1);
utf8.resize(utf8Length);
- utf16_to_utf8(utf16.data(), utf16.length(), &*utf8.begin());
return utf8;
}
diff --git a/tools/split-select/Android.mk b/tools/split-select/Android.mk
index d9ddf08..54f0a1f 100644
--- a/tools/split-select/Android.mk
+++ b/tools/split-select/Android.mk
@@ -48,8 +48,8 @@ hostStaticLibs := \
libaapt \
libandroidfw \
libpng \
- liblog \
libutils \
+ liblog \
libcutils \
libexpat \
libziparchive-host \