summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpPacket.h
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@google.com>2014-11-13 16:49:14 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-13 16:49:14 +0000
commite1e814c7c640a51511b149985d57f8bfd4a8bf78 (patch)
treee80535c005c41fc25e24648fa0fa5f50b2d53137 /media/mtp/MtpPacket.h
parentdd1b265eb3041532ad76d41bb73dbe9722decf7f (diff)
parente418cfae0970d1abe60b8cc681aa8c8a828b3769 (diff)
downloadframeworks_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.h8
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);