提交 1775b92f 编写于 作者: L Laurent Aimar 提交者: Janne Grunau

segafilm: Check for memory allocation failures in segafilm demuxer.

Signed-off-by: NJanne Grunau <janne-libav@jannau.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册