commit | 77c185d5499d6174e7a97b3e1512994d3a803151 | [log] [tgz] |
---|---|---|
author | Lajos Molnar <lajos@google.com> | Mon Oct 12 17:10:31 2015 -0700 |
committer | Lajos Molnar <lajos@google.com> | Mon Oct 12 17:27:17 2015 -0700 |
tree | f5ad0fe15b5eac1f8eb5ca52384c022ac2e60b57 | |
parent | 0b1936bee532545381db6adf22f31ac437673f30 [diff] |
stagefright: check bounds for MediaCodecList.getCodecInfo Bug: 24445127 Change-Id: I1c6cb9e2518b852d48d5d0d625b54409bd4e13ec
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 @@ 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); }