Mercurial > libavformat.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
642:868c41d335aa | 643:253b5292946a |
---|---|
169 } | 169 } |
170 | 170 |
171 size = LE_32(&preamble[0]); | 171 size = LE_32(&preamble[0]); |
172 magic = LE_16(&preamble[4]); | 172 magic = LE_16(&preamble[4]); |
173 | 173 |
174 if ((magic == FLIC_CHUNK_MAGIC_1) || (magic == FLIC_CHUNK_MAGIC_2)) { | 174 if (((magic == FLIC_CHUNK_MAGIC_1) || (magic == FLIC_CHUNK_MAGIC_2)) && size > FLIC_PREAMBLE_SIZE) { |
175 if (av_new_packet(pkt, size)) { | 175 if (av_new_packet(pkt, size)) { |
176 ret = AVERROR_IO; | 176 ret = AVERROR_IO; |
177 break; | 177 break; |
178 } | 178 } |
179 pkt->stream_index = flic->video_stream_index; | 179 pkt->stream_index = flic->video_stream_index; |