diff options
author | Martin Storsjö <martin@martin.st> | 2013-09-19 15:12:06 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-09-20 14:14:45 +0300 |
commit | a9d50bb578ec04c085a25f1e023f75e0e4499d5e (patch) | |
tree | f2357a3f82ab8a2c5ef1bfc6b68b26d9d1eaa330 /libavcodec/dcadec.c | |
parent | b97b1adb3f807e1acd00d56319ee6cb41cc727e4 (diff) | |
download | ffmpeg-a9d50bb578ec04c085a25f1e023f75e0e4499d5e.tar.gz |
dcadec: Validate the lfe parameter
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/dcadec.c')
-rw-r--r-- | libavcodec/dcadec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 209bca34ff..2676c5904f 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -580,6 +580,11 @@ static int dca_parse_frame_header(DCAContext *s) s->lfe = get_bits(&s->gb, 2); s->predictor_history = get_bits(&s->gb, 1); + if (s->lfe > 2) { + av_log(s->avctx, AV_LOG_ERROR, "Invalid LFE value: %d\n", s->lfe); + return AVERROR_INVALIDDATA; + } + /* TODO: check CRC */ if (s->crc_present) s->header_crc = get_bits(&s->gb, 16); |