diff options
author | Lajos Molnar <lajos@google.com> | 2015-10-19 12:32:27 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-10-19 12:32:27 -0700 |
commit | 92990810407a2e1101f5db156c1e264887886c82 (patch) | |
tree | 2565d910572223b4ee0b900f7545580a9d77ca63 /include | |
parent | ce8029c09d066d5b9105cfa3cc7d96a97a6c18ea (diff) | |
parent | b1231923f134a167a0351091d8944b7583928a4f (diff) | |
download | frameworks_av-92990810407a2e1101f5db156c1e264887886c82.zip frameworks_av-92990810407a2e1101f5db156c1e264887886c82.tar.gz frameworks_av-92990810407a2e1101f5db156c1e264887886c82.tar.bz2 |
am b1231923: am e550d213: am f70b69a8: Merge "stagefright: check bounds for MediaCodecList.getCodecInfo" into lmp-dev
* commit 'b1231923f134a167a0351091d8944b7583928a4f':
stagefright: check bounds for MediaCodecList.getCodecInfo
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/MediaCodecList.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/stagefright/MediaCodecList.h b/include/media/stagefright/MediaCodecList.h index c2bbe4d..ac7b053 100644 --- a/include/media/stagefright/MediaCodecList.h +++ b/include/media/stagefright/MediaCodecList.h @@ -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); } |