diff options
author | Mike Lockwood <lockwood@google.com> | 2014-11-13 16:49:14 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-13 16:49:14 +0000 |
commit | e1e814c7c640a51511b149985d57f8bfd4a8bf78 (patch) | |
tree | e80535c005c41fc25e24648fa0fa5f50b2d53137 /media/mtp/MtpPacket.h | |
parent | dd1b265eb3041532ad76d41bb73dbe9722decf7f (diff) | |
parent | e418cfae0970d1abe60b8cc681aa8c8a828b3769 (diff) | |
download | frameworks_av-e1e814c7c640a51511b149985d57f8bfd4a8bf78.zip frameworks_av-e1e814c7c640a51511b149985d57f8bfd4a8bf78.tar.gz frameworks_av-e1e814c7c640a51511b149985d57f8bfd4a8bf78.tar.bz2 |
am e418cfae: am 869e0798: Merge "MTP: add strict bounds checking for all incoming packets" into lmp-mr1-dev
* commit 'e418cfae0970d1abe60b8cc681aa8c8a828b3769':
MTP: add strict bounds checking for all incoming packets
Diffstat (limited to 'media/mtp/MtpPacket.h')
-rw-r--r-- | media/mtp/MtpPacket.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/media/mtp/MtpPacket.h b/media/mtp/MtpPacket.h index 0ffb1d3..037722a 100644 --- a/media/mtp/MtpPacket.h +++ b/media/mtp/MtpPacket.h @@ -28,11 +28,11 @@ class MtpPacket { protected: uint8_t* mBuffer; // current size of the buffer - int mBufferSize; + size_t mBufferSize; // number of bytes to add when resizing the buffer - int mAllocationIncrement; + size_t mAllocationIncrement; // size of the data in the packet - int mPacketSize; + size_t mPacketSize; public: MtpPacket(int bufferSize); @@ -41,7 +41,7 @@ public: // sets packet size to the default container size and sets buffer to zero virtual void reset(); - void allocate(int length); + void allocate(size_t length); void dump(); void copyFrom(const MtpPacket& src); |