Commit f21f423b authored by Wei Jia's avatar Wei Jia Committed by The Android Automerger
Browse files

libstagefright: check remaining data size before parsing it.

Bug: 23248776
Change-Id: I45cf53e58e4375afcf260b122264c968ec0ff6c8
(cherry picked from commit 3bf1e0fd)
parent 53e6c356
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment