mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +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:
parent
8089c652a7
commit
438abdaaeb
@ -315,6 +315,9 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *vdata,
|
|||||||
RA144Context *ractx = avctx->priv_data;
|
RA144Context *ractx = avctx->priv_data;
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
|
|
||||||
|
if (*data_size < 2*160)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if(buf_size < 20) {
|
if(buf_size < 20) {
|
||||||
av_log(avctx, AV_LOG_ERROR,
|
av_log(avctx, AV_LOG_ERROR,
|
||||||
"Frame too small (%d bytes). Truncated file?\n", buf_size);
|
"Frame too small (%d bytes). Truncated file?\n", buf_size);
|
||||||
|
Loading…
Reference in New Issue
Block a user