summaryrefslogtreecommitdiff
path: root/libavformat/flic.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/flic.c')
-rw-r--r--libavformat/flic.c2
1 files changed, 1 insertions, 1 deletions
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;