Skip to content

Commit

Permalink
flvdec: Fix invalid pointer deferences when parsing index
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Storsjö <[email protected]>
  • Loading branch information
Laurent Aimar authored and mstorsjo committed Sep 24, 2011
1 parent 87a74f4 commit 2b4e49d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libavformat/flvdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream
}
}

if (timeslen == fileposlen)
for(i = 0; i < arraylen; i++)
if (!ret && timeslen == fileposlen)
for (i = 0; i < fileposlen; i++)
av_add_index_entry(vstream, filepositions[i], times[i]*1000, 0, 0, AVINDEX_KEYFRAME);
else
av_log(s, AV_LOG_WARNING, "Invalid keyframes object, skipping.\n");
Expand Down

0 comments on commit 2b4e49d

Please sign in to comment.