projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b6f84a
)
aac: check the maximum number of channels
author
Luca Barbato
<lu_zero@gentoo.org>
Sat, 27 Apr 2013 16:20:47 +0000
(18:20 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Sat, 27 Apr 2013 22:40:33 +0000
(
00:40
+0200)
Broken bitstreams could report a larger than specified number of
channels and cause outbound writes.
CC:libav-stable@libav.org
libavcodec/aacdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/aacdec.c
b/libavcodec/aacdec.c
index
102c3d5
..
3219ec6
100644
(file)
--- a/
libavcodec/aacdec.c
+++ b/
libavcodec/aacdec.c
@@
-141,6
+141,8
@@
static av_cold int che_configure(AACContext *ac,
enum ChannelPosition che_pos,
int type, int id, int *channels)
{
+ if (*channels >= MAX_CHANNELS)
+ return AVERROR_INVALIDDATA;
if (che_pos) {
if (!ac->che[type][id]) {
if (!(ac->che[type][id] = av_mallocz(sizeof(ChannelElement))))