summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAbhishek Arya <aarya@google.com>2015-08-20 04:10:51 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-08-20 04:10:51 +0000
commit635d38a84414e26aaf6c4b5df7859fde196adeaf (patch)
treee199c5f7c141ede4bf3a46996a9a6b70dfd8c0df /media
parent2c880dde90e4303f9201f46124ee879325c57ba0 (diff)
parent4d46f6f18f5160b8992ec1e66ef1844212fc7d48 (diff)
downloadframeworks_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.cpp5
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);