Mercurial > libavcodec.hg
comparison ra288.c @ 7505:2c22852d1998 libavcodec
Check *data_size in decode_frame()
author | vitor |
---|---|
date | Wed, 06 Aug 2008 03:00:15 +0000 |
parents | c75c3adf11bc |
children | ffd4b1364b62 |
comparison
equal
deleted
inserted
replaced
7504:c75c3adf11bc | 7505:2c22852d1998 |
---|---|
234 "Error! Input buffer is too small [%d<%d]\n", | 234 "Error! Input buffer is too small [%d<%d]\n", |
235 buf_size, avctx->block_align); | 235 buf_size, avctx->block_align); |
236 return 0; | 236 return 0; |
237 } | 237 } |
238 | 238 |
239 if (*data_size < 32*5*2) | |
240 return -1; | |
241 | |
239 init_get_bits(&gb, buf, avctx->block_align * 8); | 242 init_get_bits(&gb, buf, avctx->block_align * 8); |
240 | 243 |
241 for (i=0; i < 32; i++) { | 244 for (i=0; i < 32; i++) { |
242 float gain = amptable[get_bits(&gb, 3)]; | 245 float gain = amptable[get_bits(&gb, 3)]; |
243 int cb_coef = get_bits(&gb, 6 + (i&1)); | 246 int cb_coef = get_bits(&gb, 6 + (i&1)); |