1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Check available size before writing in decode_frame()

Originally committed as revision 14637 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Vitor Sessak 2008-08-06 05:06:10 +00:00
parent 8089c652a7
commit 438abdaaeb

View File

@ -315,6 +315,9 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *vdata,
RA144Context *ractx = avctx->priv_data;
GetBitContext gb;
if (*data_size < 2*160)
return -1;
if(buf_size < 20) {
av_log(avctx, AV_LOG_ERROR,
"Frame too small (%d bytes). Truncated file?\n", buf_size);