Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-21 18:45:59 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-03-21 18:45:59 +0400
commit1426291eb84c23eb0467c857397db8a76e77a003 (patch)
tree44bba8ac9a9bcba7ca7d699cb0a6abc94bf15708 /libavcodec/sonic.c
parent8251c053209c79b39a1a0a254a5b2c1beae762ac (diff)
sonicdec: check decorrelation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/sonic.c')
-rw-r--r--libavcodec/sonic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index fe9f01f0be..ae7ca4c2b9 100644
--- 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) {