Mercurial > libavformat.hg
diff flic.c @ 643:253b5292946a libavformat
various security fixes and precautionary checks
author | michael |
---|---|
date | Wed, 12 Jan 2005 00:16:25 +0000 |
parents | 0fdc96c2f2fe |
children | c5077fdab490 |
line wrap: on
line diff
--- a/flic.c Tue Jan 11 08:16:04 2005 +0000 +++ b/flic.c Wed Jan 12 00:16:25 2005 +0000 @@ -171,7 +171,7 @@ 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;