[FFmpeg-cvslog] ico: reject icon entries that are smaller than sizeof(BITMAPHEADER)
Peter Ross
git at videolan.org
Thu Jan 12 16:35:04 CET 2012
ffmpeg | branch: master | Peter Ross <pross at xvid.org> | Thu Jan 12 23:42:05 2012 +1100| [051257495a123ad3883659137e6c8b59d3f4b393] | committer: Michael Niedermayer
ico: reject icon entries that are smaller than sizeof(BITMAPHEADER)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=051257495a123ad3883659137e6c8b59d3f4b393
---
libavformat/icodec.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavformat/icodec.c b/libavformat/icodec.c
index 9318c16..d53c33a 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);
More information about the ffmpeg-cvslog
mailing list