You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
Make TMV decoder check packet sizes before reading from it.
FATE test 295 might need updating. Originally committed as revision 18862 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -52,6 +52,13 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
return -1;
|
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.pict_type = FF_I_TYPE;
|
||||||
tmv->pic.key_frame = 1;
|
tmv->pic.key_frame = 1;
|
||||||
dst = tmv->pic.data[0];
|
dst = tmv->pic.data[0];
|
||||||
|
Reference in New Issue
Block a user