diff options
author | 2021-02-21 09:43:11 -0800 | |
---|---|---|
committer | 2021-02-21 10:28:15 -0800 | |
commit | ca3e579e96622af40cbf7d5f050c9421be81c1cb (patch) | |
tree | 4d1ff72246936a7f9b781f3b1b62bfcb9038602d /libs/binder/Parcel.cpp | |
parent | 32bf575529702144db64866a6d8c51451f412254 (diff) | |
parent | cc45cabcbaf494a70905396ec79a3811a2b33bad (diff) |
Merge ab/7061308 into stage.
Bug: 180401296
Merged-In: I703d82abf612d2a0c7f0d440da6a3e54eadab302
Change-Id: I88635f0220ad359f57d7bb7e78abb6e35382ab60
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; |