summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/id3
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2015-08-18 16:51:11 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-18 16:51:11 +0000
commitf153ecd2c1b503a404bbb7d1db0fcc19b7bcda0e (patch)
tree81ec6a47441110f2c3aad01248a322b676aab2d1 /media/libstagefright/id3
parent7bc20ac542e65af6f8f248031805632a55934f67 (diff)
parent91c712933ceb90d815f6447716409a4f1a2cc148 (diff)
downloadframeworks_av-f153ecd2c1b503a404bbb7d1db0fcc19b7bcda0e.zip
frameworks_av-f153ecd2c1b503a404bbb7d1db0fcc19b7bcda0e.tar.gz
frameworks_av-f153ecd2c1b503a404bbb7d1db0fcc19b7bcda0e.tar.bz2
am 91c71293: am 91fc84f2: am de5c4c46: am 43131299: am 1a09d352: Merge "libstagefright: check remaining data size before parsing it." into klp-dev
* commit '91c712933ceb90d815f6447716409a4f1a2cc148': libstagefright: check remaining data size before parsing it.
Diffstat (limited to 'media/libstagefright/id3')
-rw-r--r--media/libstagefright/id3/ID3.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
index 894a9c9..a39aecf 100644
--- a/media/libstagefright/id3/ID3.cpp
+++ b/media/libstagefright/id3/ID3.cpp
@@ -509,6 +509,9 @@ void ID3::Iterator::getstring(String8 *id, bool otherdata) const {
return;
}
+ if (mFrameSize < getHeaderLength() + 1) {
+ return;
+ }
size_t n = mFrameSize - getHeaderLength() - 1;
if (otherdata) {
// skip past the encoding, language, and the 0 separator