diff options
author | Abhishek Arya <aarya@google.com> | 2015-08-20 04:10:51 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-08-20 04:10:51 +0000 |
commit | 635d38a84414e26aaf6c4b5df7859fde196adeaf (patch) | |
tree | e199c5f7c141ede4bf3a46996a9a6b70dfd8c0df /media | |
parent | 2c880dde90e4303f9201f46124ee879325c57ba0 (diff) | |
parent | 4d46f6f18f5160b8992ec1e66ef1844212fc7d48 (diff) | |
download | frameworks_av-635d38a84414e26aaf6c4b5df7859fde196adeaf.zip frameworks_av-635d38a84414e26aaf6c4b5df7859fde196adeaf.tar.gz frameworks_av-635d38a84414e26aaf6c4b5df7859fde196adeaf.tar.bz2 |
Merge "Check RTSP payload length" into klp-dev
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp index aa8ffc6..851805f 100644 --- a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp +++ b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp @@ -404,8 +404,9 @@ sp<ABuffer> AMPEG4AudioAssembler::removeLATMFraming(const sp<ABuffer> &buffer) { break; } } - - CHECK_LE(offset + payloadLength, buffer->size()); + + CHECK_LT(offset, buffer->size()); + CHECK_LE(payloadLength, buffer->size() - offset); memcpy(out->data() + out->size(), &ptr[offset], payloadLength); out->setRange(0, out->size() + payloadLength); |