diff options
| author | 2021-03-02 15:49:36 -0800 | |
|---|---|---|
| committer | 2021-03-03 09:12:10 -0800 | |
| commit | 1cb959d16212aa04eba53ed50f78a80f6985ff37 (patch) | |
| tree | 2396ce25b3210d64041833939308c84ec0ad73d0 /libs/binder/Parcel.cpp | |
| parent | e9b81a40004a1996f57976d30b99749abcf89580 (diff) | |
| parent | e00110e131056db6e05b403f55e8952508f5be39 (diff) | |
Merge RQ2A.210305.007
Bug: 180401296
Merged-In: I2f7cee6cdae4b16c5adeb7af751a591a939948e2
Change-Id: I6c6bab18dc342c4456e8fd2db35173568fab1407
Diffstat (limited to 'libs/binder/Parcel.cpp')
| -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 8bed621ab4..1a4ede1940 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -1651,7 +1651,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; @@ -1689,7 +1692,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; |