You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
swfdec: check space before copy
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -362,6 +362,11 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
default:
|
default:
|
||||||
av_assert0(0);
|
av_assert0(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (linesize * height > pkt->size) {
|
||||||
|
res = AVERROR_INVALIDDATA;
|
||||||
|
goto bitmap_end;
|
||||||
|
}
|
||||||
memcpy(pkt->data, buf + colormapsize*colormapbpp, linesize * height);
|
memcpy(pkt->data, buf + colormapsize*colormapbpp, linesize * height);
|
||||||
|
|
||||||
res = pkt->size;
|
res = pkt->size;
|
||||||
|
Reference in New Issue
Block a user