Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e71b6ee authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] libbinder: readCString: no ubsan sub-overflow am: d0d4b584 am: a7134ad5

Change-Id: I91c2b9da15577f0ba59c3e38c649bb865a2d3106
parents 0e9e9b09 a7134ad5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1907,8 +1907,8 @@ status_t Parcel::readUtf8FromUtf16(std::unique_ptr<std::string>* str) const {

const char* Parcel::readCString() const
{
    if (mDataPos < mDataSize) {
        const size_t avail = mDataSize-mDataPos;
    if (avail > 0) {
        const char* str = reinterpret_cast<const char*>(mData+mDataPos);
        // is the string's trailing NUL within the parcel's valid bounds?
        const char* eos = reinterpret_cast<const char*>(memchr(str, 0, avail));