OSDN Git Service
(root)
/
android-x86
/
frameworks-av.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b1936b
)
stagefright: check bounds for MediaCodecList.getCodecInfo
author
Lajos Molnar
<lajos@google.com>
Tue, 13 Oct 2015 00:10:31 +0000
(17:10 -0700)
committer
Lajos Molnar
<lajos@google.com>
Tue, 13 Oct 2015 00:27:17 +0000
(17:27 -0700)
Bug:
24445127
Change-Id: I1c6cb9e2518b852d48d5d0d625b54409bd4e13ec
include/media/stagefright/MediaCodecList.h
patch
|
blob
|
history
diff --git
a/include/media/stagefright/MediaCodecList.h
b/include/media/stagefright/MediaCodecList.h
index
8605d99
..
67754f9
100644
(file)
--- 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);
}