summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/id3
diff options
context:
space:
mode:
authorNeel Mehta <nmehta@google.com>2015-08-20 01:16:16 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-20 01:16:16 +0000
commit0cc0d158694b20f210ba4ad41fe4adc5bda57402 (patch)
treedb5d3963c0c0b7cedef3fde286650c97df284007 /media/libstagefright/id3
parent3e15e6d738d02efb4108251cdc75240569916b69 (diff)
parent06682f94d84f97df0d826f9b15d4c2e861ba4045 (diff)
downloadframeworks_av-0cc0d158694b20f210ba4ad41fe4adc5bda57402.zip
frameworks_av-0cc0d158694b20f210ba4ad41fe4adc5bda57402.tar.gz
frameworks_av-0cc0d158694b20f210ba4ad41fe4adc5bda57402.tar.bz2
am 06682f94: am 48bdf782: am 00887af1: am e9a8362e: am a2a68264: am c37f7f6f: Fix for memory corruption in ID3::removeUnsynchronizationV2_4(). Bug: 23227354
* commit '06682f94d84f97df0d826f9b15d4c2e861ba4045': Fix for memory corruption in ID3::removeUnsynchronizationV2_4(). Bug: 23227354
Diffstat (limited to 'media/libstagefright/id3')
-rw-r--r--media/libstagefright/id3/ID3.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
index 29bc9e0..165d4d9 100644
--- a/media/libstagefright/id3/ID3.cpp
+++ b/media/libstagefright/id3/ID3.cpp
@@ -349,7 +349,7 @@ bool ID3::removeUnsynchronizationV2_4(bool iTunesHack) {
if (flags & 1) {
// Strip data length indicator
- if (mSize < 14 || mSize - 14 < offset) {
+ if (mSize < 14 || mSize - 14 < offset || dataSize < 4) {
return false;
}
memmove(&mData[offset + 10], &mData[offset + 14], mSize - offset - 14);