Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ab9c85e authored by Wei Jia's avatar Wei Jia Committed by Android (Google) Code Review
Browse files

Merge "MPEG4Extractor: ensure buffer size is not less than 8 for LastCommentData." into klp-dev

parents 257b3bc5 e6d904fe
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2153,6 +2153,12 @@ status_t MPEG4Extractor::parseMetaData(off64_t offset, size_t size) {
                    mLastCommentName.setTo((const char *)buffer + 4);
                    break;
                case FOURCC('d', 'a', 't', 'a'):
                    if (size < 8) {
                        delete[] buffer;
                        buffer = NULL;
                        ALOGE("b/24346430");
                        return ERROR_MALFORMED;
                    }
                    mLastCommentData.setTo((const char *)buffer + 8);
                    break;
            }