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

Commit 3aef64ae authored by Lajos Molnar's avatar Lajos Molnar Committed by Jessica Wagantall
Browse files

stagefright: check bounds for MediaCodecList.getCodecInfo

Ticket: CYNGNOS-1299
Bug: 24445127
Change-Id: I1c6cb9e2518b852d48d5d0d625b54409bd4e13ec
(cherry picked from commit 77c185d5)
parent 2bec8325
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);
    }