changeset 4294:e6b06b0c611a libavformat

size < 4 is invalid
author michael
date Tue, 27 Jan 2009 20:51:10 +0000
parents 491a0b1d4f62
children 36a6d25e95ea
files 4xm.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/4xm.c	Tue Jan 27 18:01:26 2009 +0000
+++ b/4xm.c	Tue Jan 27 20:51:10 2009 +0000
@@ -114,7 +114,7 @@
     /* 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 */