aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/segafilm.c
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@elivagar.org>2011-10-06 22:53:41 +0200
committerJanne Grunau <janne-libav@jannau.net>2011-10-06 23:19:45 +0200
commit1775b92fee43f0527e2f5892a5a30450fa929722 (patch)
tree883c5ae6a35ccf658695587ec347ce4eb840fe62 /libavformat/segafilm.c
parent762ffa6861a8afefe11e1fe18e7b47c18d2d62f6 (diff)
downloadffmpeg-1775b92fee43f0527e2f5892a5a30450fa929722.tar.gz
segafilm: Check for memory allocation failures in segafilm demuxer.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diffstat (limited to 'libavformat/segafilm.c')
-rw-r--r--libavformat/segafilm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index ea464f29fd..4bbacc5fa6 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -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);