Commit a246cefa authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Martin Storsjö

flvdec: Check for overflow before allocating arrays

On allocation, the array length is multiplied by sizeof(int64_t),
this prevents the multiplication from overflowing.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 9b921a82
......@@ -161,6 +161,9 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream
break;
arraylen = avio_rb32(ioc);
if (arraylen >> 28)
break;
/*
* Expect only 'times' or 'filepositions' sub-arrays in other case refuse to use such metadata
* for indexing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment