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

Commit 8dd9ef19 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "ResStringPool: Prevenet boot loop from se fix" into pi-dev

parents c49d44c3 f05f47b2
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -458,7 +458,7 @@ status_t ResStringPool::setTo(const void* data, size_t size, bool copyData)


    // The chunk must be at least the size of the string pool header.
    // The chunk must be at least the size of the string pool header.
    if (size < sizeof(ResStringPool_header)) {
    if (size < sizeof(ResStringPool_header)) {
        LOG_ALWAYS_FATAL("Bad string block: data size %zu is too small to be a string block", size);
        ALOGW("Bad string block: data size %zu is too small to be a string block", size);
        return (mError=BAD_TYPE);
        return (mError=BAD_TYPE);
    }
    }


@@ -468,7 +468,7 @@ status_t ResStringPool::setTo(const void* data, size_t size, bool copyData)
    if (validate_chunk(reinterpret_cast<const ResChunk_header*>(data), sizeof(ResStringPool_header),
    if (validate_chunk(reinterpret_cast<const ResChunk_header*>(data), sizeof(ResStringPool_header),
                       reinterpret_cast<const uint8_t*>(data) + size,
                       reinterpret_cast<const uint8_t*>(data) + size,
                       "ResStringPool_header") != NO_ERROR) {
                       "ResStringPool_header") != NO_ERROR) {
        LOG_ALWAYS_FATAL("Bad string block: malformed block dimensions");
        ALOGW("Bad string block: malformed block dimensions");
        return (mError=BAD_TYPE);
        return (mError=BAD_TYPE);
    }
    }