diff options
author | Martin Storsjö <[email protected]> | 2013-09-19 15:12:06 +0300 |
---|---|---|
committer | Luca Barbato <[email protected]> | 2014-01-07 09:43:57 +0100 |
commit | 456a9392103f6ccd63173660804b1029052dc36c (patch) | |
tree | a96583a36c83286c1c64487bad30b41e2a5fcd1c | |
parent | c211ba9b59e8a7c730dfacc536e59f036e77950f (diff) |
dca: Validate the lfe parameter
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: [email protected]
Signed-off-by: Martin Storsjö <[email protected]>
(cherry picked from commit a9d50bb578ec04c085a25f1e023f75e0e4499d5e)
Signed-off-by: Luca Barbato <[email protected]>
-rw-r--r-- | libavcodec/dca.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c index 169c9b41b9..4d71812d88 100644 --- a/libavcodec/dca.c +++ b/libavcodec/dca.c @@ -578,6 +578,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); |