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

Commit f70b69a8 authored by Lajos Molnar's avatar Lajos Molnar Committed by Android (Google) Code Review
Browse files

Merge "stagefright: check bounds for MediaCodecList.getCodecInfo" into lmp-dev

parents 56d193ac 77c185d5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -45,6 +45,10 @@ struct MediaCodecList : public BnMediaCodecList {
    virtual size_t countCodecs() const;

    virtual sp<MediaCodecInfo> getCodecInfo(size_t index) const {
        if (index >= mCodecInfos.size()) {
            ALOGE("b/24445127");
            return NULL;
        }
        return mCodecInfos.itemAt(index);
    }