changeset 3201:35f5c9a8bc83 libavcodec

segfault fix
author michael
date Sat, 18 Mar 2006 02:29:58 +0000
parents 646f6344472d
children 89348aaf566e
files huffyuv.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/huffyuv.c	Fri Mar 17 16:40:10 2006 +0000
+++ b/huffyuv.c	Sat Mar 18 02:29:58 2006 +0000
@@ -808,6 +808,9 @@
             return -1;
     }
 
+    if((unsigned)(buf_size-table_size) >= INT_MAX/8)
+        return -1;
+
     init_get_bits(&s->gb, s->bitstream_buffer+table_size, (buf_size-table_size)*8);
 
     fake_ystride= s->interlaced ? p->linesize[0]*2  : p->linesize[0];