summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-10-19 12:26:55 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-19 12:26:55 -0700
commitb1231923f134a167a0351091d8944b7583928a4f (patch)
tree2565d910572223b4ee0b900f7545580a9d77ca63 /include
parentf5bff8c9df4444ca91a14ba26cfe005f9f100250 (diff)
parente550d21360287c752fd79a67f1962244ee272be1 (diff)
downloadframeworks_av-b1231923f134a167a0351091d8944b7583928a4f.zip
frameworks_av-b1231923f134a167a0351091d8944b7583928a4f.tar.gz
frameworks_av-b1231923f134a167a0351091d8944b7583928a4f.tar.bz2
am e550d213: am f70b69a8: Merge "stagefright: check bounds for MediaCodecList.getCodecInfo" into lmp-dev
* commit 'e550d21360287c752fd79a67f1962244ee272be1': stagefright: check bounds for MediaCodecList.getCodecInfo
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/MediaCodecList.h4
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);
}