summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-10-19 19:37:04 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-19 19:37:04 +0000
commit0378676b3f12158537a01916e69f6ab51817605f (patch)
tree50acfa79aca6076b56c66e1f6d0d26b530038242 /include
parentf30d7e0acc573b58333c3c704c2a46eda1dbfcff (diff)
parent92990810407a2e1101f5db156c1e264887886c82 (diff)
downloadframeworks_av-0378676b3f12158537a01916e69f6ab51817605f.zip
frameworks_av-0378676b3f12158537a01916e69f6ab51817605f.tar.gz
frameworks_av-0378676b3f12158537a01916e69f6ab51817605f.tar.bz2
am 92990810: am b1231923: am e550d213: am f70b69a8: Merge "stagefright: check bounds for MediaCodecList.getCodecInfo" into lmp-dev
* commit '92990810407a2e1101f5db156c1e264887886c82': 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);
}