summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-10-19 19:44:59 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-19 19:44:59 +0000
commit00a1dcafd944ff93eb4848f044adcbfb0784a0dd (patch)
tree1af7590015198858d5a2ba0e30477307e7f9713b /include
parent32ab9fdab562127ccd37a8cdb15421ebdf82a458 (diff)
parent32ba6ec761fc62f7da217281ac5bb598ffed2db8 (diff)
downloadframeworks_av-00a1dcafd944ff93eb4848f044adcbfb0784a0dd.zip
frameworks_av-00a1dcafd944ff93eb4848f044adcbfb0784a0dd.tar.gz
frameworks_av-00a1dcafd944ff93eb4848f044adcbfb0784a0dd.tar.bz2
am 32ba6ec7: am 0378676b: am 92990810: am b1231923: am e550d213: am f70b69a8: Merge "stagefright: check bounds for MediaCodecList.getCodecInfo" into lmp-dev
* commit '32ba6ec761fc62f7da217281ac5bb598ffed2db8': 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 3aaa032..bf4db87 100644
--- a/include/media/stagefright/MediaCodecList.h
+++ b/include/media/stagefright/MediaCodecList.h
@@ -47,6 +47,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);
}