OSDN Git Service
(root)
/
android-x86
/
frameworks-av.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
768a8fb
1f44d83
)
resolved conflicts for merge of 1f44d837 to lmp-dev
author
Wei Jia
<wjia@google.com>
Sat, 6 Jun 2015 00:43:52 +0000
(17:43 -0700)
committer
Wei Jia
<wjia@google.com>
Sat, 6 Jun 2015 00:43:52 +0000
(17:43 -0700)
Change-Id: Id60c2470ec2afebdbc1c0c995b90e294c9c879eb
1
2
media/libstagefright/MPEG4Extractor.cpp
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
media/libstagefright/MPEG4Extractor.cpp
index
5a86aac
,
4f08f70
..
00af00b
---
1
/
media/libstagefright/MPEG4Extractor.cpp
---
2
/
media/libstagefright/MPEG4Extractor.cpp
+++ b/
media/libstagefright/MPEG4Extractor.cpp
@@@
-1890,7
-1728,11
+1890,11
@@@
status_t MPEG4Extractor::parseChunk(off
size = 0;
}
- uint8_t *buffer = new uint8_t[size + chunk_size];
+ if (SIZE_MAX - chunk_size <= size) {
+ return ERROR_MALFORMED;
+ }
+
+ uint8_t *buffer = new (std::nothrow) uint8_t[size + chunk_size];
if (buffer == NULL) {
return ERROR_MALFORMED;
}