summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-10-19 12:21:59 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-19 12:21:59 -0700
commite550d21360287c752fd79a67f1962244ee272be1 (patch)
treea84244733e3cae3f56566e3f0cff1cc5abcb434b /include/media
parent7d8bb7a7f985658ca0cfcd7d6bd05d20ad3a084e (diff)
parentf70b69a8b5ed044112516bf69f69905e521070b6 (diff)
downloadframeworks_av-e550d21360287c752fd79a67f1962244ee272be1.zip
frameworks_av-e550d21360287c752fd79a67f1962244ee272be1.tar.gz
frameworks_av-e550d21360287c752fd79a67f1962244ee272be1.tar.bz2
am f70b69a8: Merge "stagefright: check bounds for MediaCodecList.getCodecInfo" into lmp-dev
* commit 'f70b69a8b5ed044112516bf69f69905e521070b6': 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 8605d99..67754f9 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);
}