Commit 47348042 authored by tmmm's avatar tmmm

allocate enough bytes


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1908 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 0e03ac52
......@@ -151,8 +151,9 @@ static int fourxm_read_header(AVFormatContext *s,
}
current_track = LE_32(&header[i + 8]);
if (current_track + 1 > fourxm->track_count) {
fourxm->track_count++;
fourxm->tracks = av_realloc(fourxm->tracks, fourxm->track_count);
fourxm->track_count = current_track + 1;
fourxm->tracks = av_realloc(fourxm->tracks,
fourxm->track_count * sizeof(AudioTrack));
if (!fourxm->tracks) {
av_free(header);
return AVERROR_NOMEM;
......
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