changeset 4148:228252c41929 libavcodec

Check for symbol count
author kostya
date Mon, 06 Nov 2006 06:13:29 +0000
parents c8fa103d8c75
children 3118e8afb8a5
files fraps.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/fraps.c	Mon Nov 06 05:35:09 2006 +0000
+++ b/fraps.c	Mon Nov 06 06:13:29 2006 +0000
@@ -140,6 +140,10 @@
         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;
     }