diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-01-25 01:29:10 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-01-25 01:29:10 +0000 |
commit | 6b250f09e803975ae5aa3fce79a3960b5b05469a (patch) | |
tree | 6eb3dec46b8575142c00648a8b6b49555e3b5c51 /libavcodec | |
parent | e5540b3fd30367ce3cc33b2f34a04b660dbc4b38 (diff) | |
download | ffmpeg-6b250f09e803975ae5aa3fce79a3960b5b05469a.tar.gz |
check norm6 vlc validity as there are some bit sequences which dont corespond to any codeword, the other vlc tables all seem to be huffman tables though
Originally committed as revision 3883 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vc9.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/vc9.c b/libavcodec/vc9.c index 9da148fee7..a0e22c2078 100644 --- a/libavcodec/vc9.c +++ b/libavcodec/vc9.c @@ -852,6 +852,10 @@ static int bitplane_decoding(BitPlane *bp, VC9Context *v) for(y= bp->height%tile_h; y< bp->height; y+=tile_h){ for(x= bp->width%tile_w; x< bp->width; x+=tile_w){ code = get_vlc2(&v->gb, vc9_norm6_vlc.table, VC9_NORM6_VLC_BITS, 2); + if(code<0){ + av_log(v->avctx, AV_LOG_DEBUG, "inavlid NORM-6 VLC\n"); + return -1; + } //FIXME following is a pure guess and probably wrong //FIXME A bitplane (0 | !0), so could the shifts be avoided ? planep[x + 0*bp->stride]= (code>>0)&1; |