![]() In the original code when target is an empty string strlen16() would start reading the memory until a "terminating null" (that is, zero) character is found. This may happen because "*target++", at line 300, would increment the pointer beyond the actual string. Signed-off-by: Branislav Rankov <branislav.rankov@arm.com> Signed-off-by: Tamas Petz <tamas.petz@arm.com> Test: libutils_tests --gtest_filter=UnicodeTest.strstr16* Change-Id: I213ffe061057c7fa8f34b68881e106a709557dcd |
||
---|---|---|
.. | ||
Android.bp | ||
BitSet_test.cpp | ||
Looper_test.cpp | ||
LruCache_test.cpp | ||
Mutex_test.cpp | ||
README.txt | ||
RefBase_test.cpp | ||
Singleton_test.cpp | ||
Singleton_test.h | ||
Singleton_test1.cpp | ||
Singleton_test2.cpp | ||
String8_test.cpp | ||
StrongPointer_test.cpp | ||
SystemClock_test.cpp | ||
TestHelpers.h | ||
Unicode_test.cpp | ||
Vector_test.cpp |
README.txt
Run device tests: mma -j<whatever> (after adb root; adb disable-verity; adb reboot) adb root adb remount adb sync adb shell /data/nativetest/libutils_tests/libutils_tests