[FFmpeg-cvslog] dcadec: Validate the lfe parameter
Martin Storsjö
git at videolan.org
Tue Oct 8 01:33:16 CEST 2013
ffmpeg | branch: release/1.1 | Martin Storsjö <martin at martin.st> | Thu Sep 19 15:12:06 2013 +0300| [97b6916f93e6998ed787e35efc56018f9d390c55] | committer: Luca Barbato
dcadec: Validate the lfe parameter
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit a9d50bb578ec04c085a25f1e023f75e0e4499d5e)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97b6916f93e6998ed787e35efc56018f9d390c55
---
libavcodec/dcadec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 561c30c..eecdeaa 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -582,6 +582,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);
More information about the ffmpeg-cvslog
mailing list