]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
size < 4 is invalid
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 27 Jan 2009 20:51:10 +0000 (20:51 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 27 Jan 2009 20:51:10 +0000 (20:51 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16829 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/4xm.c

index c792a776ef7327271ee8c1b27d8dcd29705e3914..af57c6c5b610c651465f58003c9f6361ea76cb91 100644 (file)
@@ -114,7 +114,7 @@ static int fourxm_read_header(AVFormatContext *s,
     /* check for LIST-HEAD */
     GET_LIST_HEADER();
     header_size = size - 4;
-    if (fourcc_tag != HEAD_TAG)
+    if (fourcc_tag != HEAD_TAG || size < 4)
         return AVERROR_INVALIDDATA;
 
     /* allocate space for the header and load the whole thing */