Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2012-01-12 16:42:05 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-01-12 19:32:55 +0400
commit051257495a123ad3883659137e6c8b59d3f4b393 (patch)
tree5b6abc1595c980d953e4b95422d8dbaad00d4feb /libavformat/icodec.c
parent90dbd0812731eb1a744b74dcb7a71112ff22db07 (diff)
ico: reject icon entries that are smaller than sizeof(BITMAPHEADER)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/icodec.c')
-rw-r--r--libavformat/icodec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/icodec.c b/libavformat/icodec.c
index 9318c160dd..d53c33ab0a 100644
--- a/libavformat/icodec.c
+++ b/libavformat/icodec.c
@@ -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);