Skip to content
Snippets Groups Projects
Commit 4698bb24 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

size < 4 is invalid

Originally committed as revision 16829 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent f7ad5aa2
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment