diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-12-10 00:14:50 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-12-10 00:14:50 +0000 |
commit | 372c23a271fbc8db5b98533af1320572ab1702cd (patch) | |
tree | 73b761a57c33ba1ff9f48fc9d1a7be0f11ea7ab4 | |
parent | 20522b21c6bb135216fd4eb5793b8bc0d893dbba (diff) | |
parent | 082832d91d8ed940b24c7fe85bb4d6f7f66a7672 (diff) | |
download | native-372c23a271fbc8db5b98533af1320572ab1702cd.tar.gz |
Snap for 7022639 from 082832d91d8ed940b24c7fe85bb4d6f7f66a7672 to rvc-qpr2-release
Change-Id: I2d1e868f8f5d109b9d4fc2598f8f9b0e52ba162a
-rw-r--r-- | libs/binder/Parcel.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index a5549fc07d..64a4f9bf6d 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -1882,7 +1882,10 @@ const char* Parcel::readString8Inplace(size_t* outLen) const *outLen = size; const char* str = (const char*)readInplace(size+1); if (str != nullptr) { - return str; + if (str[size] == '\0') { + return str; + } + android_errorWriteLog(0x534e4554, "172655291"); } } *outLen = 0; @@ -1942,7 +1945,10 @@ const char16_t* Parcel::readString16Inplace(size_t* outLen) const *outLen = size; const char16_t* str = (const char16_t*)readInplace((size+1)*sizeof(char16_t)); if (str != nullptr) { - return str; + if (str[size] == u'\0') { + return str; + } + android_errorWriteLog(0x534e4554, "172655291"); } } *outLen = 0; |