diff options
author | Marco Nelissen <marcone@google.com> | 2014-06-23 19:54:07 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-06-23 19:54:07 +0000 |
commit | c27f5259cf2c45ea6f0a021fc17578f32f6c2f7d (patch) | |
tree | 86ce7864cb48f85e5b26307d23554965ccfb14c2 | |
parent | 215ebcddf7216d15fde34f9a32d27f280d1b19d3 (diff) | |
parent | 620f348faf3ce0c39e71338a005f1528765f4d1e (diff) | |
download | frameworks_av-c27f5259cf2c45ea6f0a021fc17578f32f6c2f7d.zip frameworks_av-c27f5259cf2c45ea6f0a021fc17578f32f6c2f7d.tar.gz frameworks_av-c27f5259cf2c45ea6f0a021fc17578f32f6c2f7d.tar.bz2 |
am 620f348f: am da69fdbb: Merge "Fix buffer allocation"
* commit '620f348faf3ce0c39e71338a005f1528765f4d1e':
Fix buffer allocation
-rw-r--r-- | media/mtp/MtpDataPacket.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/mtp/MtpDataPacket.cpp b/media/mtp/MtpDataPacket.cpp index c4f87a0..e6e19e3 100644 --- a/media/mtp/MtpDataPacket.cpp +++ b/media/mtp/MtpDataPacket.cpp @@ -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); |