Don't use UTF16 length as length for MUTF8.
Bug 11367555.
Change-Id: Ia0b07072a1a49d435c3b71ed9a668b316b7ff5d8
diff --git a/runtime/native/dalvik_system_VMRuntime.cc b/runtime/native/dalvik_system_VMRuntime.cc
index 4629dbd..71ed95c 100644
--- a/runtime/native/dalvik_system_VMRuntime.cc
+++ b/runtime/native/dalvik_system_VMRuntime.cc
@@ -222,7 +222,7 @@
}
const DexFile* dex_file = dex_cache->GetDexFile();
uint32_t utf16Size;
- const char* utf8 = dex_file->StringDataAndLengthByIdx(string_idx, &utf16Size);
+ const char* utf8 = dex_file->StringDataAndUtf16LengthByIdx(string_idx, &utf16Size);
string = strings[utf8];
if (string == NULL) {
return;