mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
ico: reject icon entries that are smaller than sizeof(BITMAPHEADER)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
90dbd08127
commit
051257495a
@ -94,6 +94,8 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||
st->codec->height = 0;
|
||||
break;
|
||||
case 40:
|
||||
if (ico->images[i].size < 40)
|
||||
return AVERROR_INVALIDDATA;
|
||||
st->codec->codec_id = CODEC_ID_BMP;
|
||||
if (!st->codec->width || !st->codec->height) {
|
||||
st->codec->width = avio_rl32(pb);
|
||||
|
Loading…
Reference in New Issue
Block a user