diff options
| author | Branislav Rankov <branislav.rankov@arm.com> | 2017-10-12 15:08:42 +0200 |
|---|---|---|
| committer | Mark Salyzyn <salyzyn@google.com> | 2017-10-24 10:36:00 -0700 |
| commit | f51d4dd802aa69407f99b08f17e43d27b55004ac (patch) | |
| tree | 37ce2048faef4e49fc5b97a0abf15f5f460342ce /libcutils/socket_local_server_unix.cpp | |
| parent | f57f35e2ae8be65650c32111b719edbb53edd799 (diff) | |
libutils: Fix bug in strstr16.
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
Diffstat (limited to 'libcutils/socket_local_server_unix.cpp')
0 files changed, 0 insertions, 0 deletions
