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

Commit 620f348f authored by Marco Nelissen's avatar Marco Nelissen Committed by Android Git Automerger
Browse files

am da69fdbb: Merge "Fix buffer allocation"

* commit 'da69fdbb':
  Fix buffer allocation
parents 7f76c502 da69fdbb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -363,7 +363,7 @@ int MtpDataPacket::write(int fd) {
}

int MtpDataPacket::writeData(int fd, void* data, uint32_t length) {
    allocate(length);
    allocate(length + MTP_CONTAINER_HEADER_SIZE);
    memcpy(mBuffer + MTP_CONTAINER_HEADER_SIZE, data, length);
    length += MTP_CONTAINER_HEADER_SIZE;
    MtpPacket::putUInt32(MTP_CONTAINER_LENGTH_OFFSET, length);