summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-10-19 19:41:27 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-19 19:41:27 +0000
commit32ba6ec761fc62f7da217281ac5bb598ffed2db8 (patch)
tree812714a5fe147dddbb87abca1db78c8824a7a3d8 /include/media
parent7b80648180feaad1e7edaecd078246f5002a8fb6 (diff)
parent0378676b3f12158537a01916e69f6ab51817605f (diff)
downloadframeworks_av-32ba6ec761fc62f7da217281ac5bb598ffed2db8.zip
frameworks_av-32ba6ec761fc62f7da217281ac5bb598ffed2db8.tar.gz
frameworks_av-32ba6ec761fc62f7da217281ac5bb598ffed2db8.tar.bz2
am 0378676b: am 92990810: am b1231923: am e550d213: am f70b69a8: Merge "stagefright: check bounds for MediaCodecList.getCodecInfo" into lmp-dev
* commit '0378676b3f12158537a01916e69f6ab51817605f': stagefright: check bounds for MediaCodecList.getCodecInfo
Diffstat (limited to 'include/media')
-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);
}