mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-25 00:10:00 +01:00
various security fixes and precautionary checks
Originally committed as revision 3822 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user