Commit 1775b92f authored by Laurent Aimar's avatar Laurent Aimar Committed by Janne Grunau

segafilm: Check for memory allocation failures in segafilm demuxer.

Signed-off-by: 's avatarJanne Grunau <janne-libav@jannau.net>
parent 762ffa68
......@@ -257,6 +257,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);
......
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