Browse Source

segafilm: Check for memory allocation failures in segafilm demuxer.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
(cherry picked from commit 1775b92fee)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n0.8.11
Laurent Aimar Reinhard Tartler 14 years ago
parent
commit
ea5a5f0908
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavformat/segafilm.c

+ 4
- 0
libavformat/segafilm.c View File

@@ -238,6 +238,10 @@ static int film_read_packet(AVFormatContext *s,
av_free(film->stereo_buffer);
film->stereo_buffer_size = sample->sample_size;
film->stereo_buffer = av_malloc(film->stereo_buffer_size);
if (!film->stereo_buffer) {
film->stereo_buffer_size = 0;
return AVERROR(ENOMEM);
}
}

pkt->pos= avio_tell(pb);


Loading…
Cancel
Save