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

Commit 98179e1a authored by Ashish Kumar Gupta's avatar Ashish Kumar Gupta Committed by Android (Google) Code Review
Browse files

Merge "Update mtp packet buffer" into main

parents ee5e5d83 e1494a2d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -168,8 +168,10 @@ void MtpPacket::setParameter(int index, uint32_t value) {
        return;
    }
    int offset = MTP_CONTAINER_PARAMETER_OFFSET + (index - 1) * sizeof(uint32_t);
    if (mPacketSize < offset + sizeof(uint32_t))
    if (mPacketSize < offset + sizeof(uint32_t)) {
        mPacketSize = offset + sizeof(uint32_t);
        allocate(mPacketSize);
    }
    putUInt32(offset, value);
}