Commit 6a326c22 authored by vitor's avatar vitor

Make TMV decoder check packet sizes before reading from it.

FATE test 295 might need updating.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18862 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent dede8155
......@@ -52,6 +52,13 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data,
return -1;
}
if (avpkt->size < 2*char_rows*char_cols) {
av_log(avctx, AV_LOG_ERROR,
"Input buffer too small, truncated sample?\n");
*data_size = 0;
return -1;
}
tmv->pic.pict_type = FF_I_TYPE;
tmv->pic.key_frame = 1;
dst = tmv->pic.data[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment