[SCM] libav/experimental: Check for symbol count

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:53:00 UTC 2013


The following commit has been merged in the experimental branch:
commit f4e31985da4ba620bb32347c0ef30de71727116c
Author: Kostya Shishkov <kostya.shishkov at gmail.com>
Date:   Mon Nov 6 06:13:29 2006 +0000

    Check for symbol count
    
    Originally committed as revision 6910 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index aff6566..18d2700 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -140,6 +140,10 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
         s->nodes[i].sym = i;
         s->nodes[i].count = LE_32(src);
         s->nodes[i].n0 = -2;
+        if(s->nodes[i].count < 0) {
+            av_log(s->avctx, AV_LOG_ERROR, "Symbol count < 0\n");
+            return -1;
+        }
         src += 4;
         sum += s->nodes[i].count;
     }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list