[FFmpeg-cvslog] avcodec/dcadec: Check subsubframes

Michael Niedermayer git at videolan.org
Wed Jun 17 22:09:42 CEST 2015


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Thu May 14 21:29:19 2015 +0200| [b259c7e891016df2c6a8f1b84c62838f5b7c68ff] | committer: Michael Niedermayer

avcodec/dcadec: Check subsubframes

Fixes: CID1239152

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit a9bf628bfdad142763880a3d1ccb6058040dda57)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b259c7e891016df2c6a8f1b84c62838f5b7c68ff
---

 libavcodec/dcadec.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 1d020ba..43fc40d 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -847,6 +847,10 @@ static int dca_subframe_header(DCAContext *s, int base_channel, int block_index)
 
     if (!base_channel) {
         s->subsubframes[s->current_subframe]    = get_bits(&s->gb, 2) + 1;
+        if (block_index + s->subsubframes[s->current_subframe] > s->sample_blocks/8) {
+            s->subsubframes[s->current_subframe] = 1;
+            return AVERROR_INVALIDDATA;
+        }
         s->partial_samples[s->current_subframe] = get_bits(&s->gb, 3);
     }
 



More information about the ffmpeg-cvslog mailing list