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:
586e5bd
)
Test for supported number of channels
author
Vitor Sessak
<vitor1001@gmail.com>
Wed, 18 Jul 2007 06:45:47 +0000
(06:45 +0000)
committer
Vitor Sessak
<vitor1001@gmail.com>
Wed, 18 Jul 2007 06:45:47 +0000
(06:45 +0000)
Originally committed as revision 9730 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/alac.c
patch
|
blob
|
history
diff --git
a/libavcodec/alac.c
b/libavcodec/alac.c
index fac8a83025dd5789a8209d31936eb6a5a7be6b8e..3883f418f45884633a192d8bef58f6b36f6fee1e 100644
(file)
--- a/
libavcodec/alac.c
+++ b/
libavcodec/alac.c
@@
-491,6
+491,11
@@
static int alac_decode_frame(AVCodecContext *avctx,
init_get_bits(&alac->gb, inbuffer, input_buffer_size * 8);
channels = get_bits(&alac->gb, 3) + 1;
+ if (channels > MAX_CHANNELS) {
+ av_log(avctx, AV_LOG_ERROR, "channels > %d not supported\n",
+ MAX_CHANNELS);
+ return input_buffer_size;
+ }
/* 2^result = something to do with output waiting.
* perhaps matters if we read > 1 frame in a pass?