projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
762ffa6
)
segafilm: Check for memory allocation failures in segafilm demuxer.
author
Laurent Aimar
<fenrir@elivagar.org>
Thu, 6 Oct 2011 20:53:41 +0000
(22:53 +0200)
committer
Janne Grunau
<janne-libav@jannau.net>
Thu, 6 Oct 2011 21:19:45 +0000
(23:19 +0200)
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
libavformat/segafilm.c
patch
|
blob
|
history
diff --git
a/libavformat/segafilm.c
b/libavformat/segafilm.c
index
ea464f2
..
4bbacc5
100644
(file)
--- 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);