summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-10-19 19:17:30 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-10-19 19:17:30 +0000
commitf70b69a8b5ed044112516bf69f69905e521070b6 (patch)
treebe01243eb8f590f2bf5e756dc1a61e204acccbae
parent56d193acbec3c387a9d479df003b41362bcf3644 (diff)
parent77c185d5499d6174e7a97b3e1512994d3a803151 (diff)
downloadframeworks_av-f70b69a8b5ed044112516bf69f69905e521070b6.zip
frameworks_av-f70b69a8b5ed044112516bf69f69905e521070b6.tar.gz
frameworks_av-f70b69a8b5ed044112516bf69f69905e521070b6.tar.bz2
Merge "stagefright: check bounds for MediaCodecList.getCodecInfo" into lmp-dev
-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);
}