[SCM] libav/experimental: Add a check to vp6_parse_coeff_huffman to ensure it does not overread the input buffer.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:48:36 UTC 2013


The following commit has been merged in the experimental branch:
commit ad9210869459cede35baabbe20820b80e666c358
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date:   Sun Jul 5 16:01:51 2009 +0000

    Add a check to vp6_parse_coeff_huffman to ensure it does not overread the input buffer.
    
    Originally committed as revision 19349 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index c1ca227..de98e61 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -372,6 +372,8 @@ static void vp6_parse_coeff_huffman(VP56Context *s)
                 if (coeff_idx)
                     break;
             } else {
+                if (get_bits_count(&s->gb) >= s->gb.size_in_bits)
+                    return;
                 coeff = get_vlc2(&s->gb, vlc_coeff->table, 9, 3);
                 if (coeff == 0) {
                     if (coeff_idx) {

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list