From 0ecca7a49f8e254c12a3a1de048d738bfbb614c6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 12 Jan 2005 00:16:25 +0000 Subject: various security fixes and precautionary checks Originally committed as revision 3822 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/flic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/flic.c') diff --git a/libavformat/flic.c b/libavformat/flic.c index 65b7b9f92a..7fc3b9a33f 100644 --- a/libavformat/flic.c +++ b/libavformat/flic.c @@ -171,7 +171,7 @@ static int flic_read_packet(AVFormatContext *s, size = LE_32(&preamble[0]); magic = LE_16(&preamble[4]); - if ((magic == FLIC_CHUNK_MAGIC_1) || (magic == FLIC_CHUNK_MAGIC_2)) { + if (((magic == FLIC_CHUNK_MAGIC_1) || (magic == FLIC_CHUNK_MAGIC_2)) && size > FLIC_PREAMBLE_SIZE) { if (av_new_packet(pkt, size)) { ret = AVERROR_IO; break; -- cgit v1.2.3