OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8251c05
)
sonicdec: check decorrelation
author
Michael Niedermayer
<michaelni@gmx.at>
Thu, 21 Mar 2013 14:45:59 +0000
(15:45 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Thu, 21 Mar 2013 14:45:59 +0000
(15:45 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/sonic.c
patch
|
blob
|
history
diff --git
a/libavcodec/sonic.c
b/libavcodec/sonic.c
index
fe9f01f
..
ae7ca4c
100644
(file)
--- a/
libavcodec/sonic.c
+++ b/
libavcodec/sonic.c
@@
-801,6
+801,10
@@
static av_cold int sonic_decode_init(AVCodecContext *avctx)
if (!s->lossless)
skip_bits(&gb, 3); // XXX FIXME
s->decorrelation = get_bits(&gb, 2);
+ if (s->decorrelation != 3 && s->channels != 2) {
+ av_log(avctx, AV_LOG_ERROR, "invalid decorrelation %d\n", s->decorrelation);
+ return AVERROR_INVALIDDATA;
+ }
s->downsampling = get_bits(&gb, 2);
if (!s->downsampling) {