Commit 05125749 authored by Peter Ross's avatar Peter Ross Committed by Michael Niedermayer

ico: reject icon entries that are smaller than sizeof(BITMAPHEADER)

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 90dbd081
......@@ -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);
......
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