diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-19 19:11:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-19 19:11:49 +0100 |
commit | 1dcce49e10dcebde9d2cc52565fa299c5fdfd691 (patch) | |
tree | 10f865a6e8b6acce46564b91bf06d77892d2c092 | |
parent | 1d0ae92a259b924952856de1a5ca0dc6fd5031e5 (diff) | |
download | ffmpeg-1dcce49e10dcebde9d2cc52565fa299c5fdfd691.tar.gz |
soxdec: check av_malloc return.
Bug found by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/soxdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/soxdec.c b/libavformat/soxdec.c index ad8f488961..23fea38fd4 100644 --- a/libavformat/soxdec.c +++ b/libavformat/soxdec.c @@ -98,6 +98,8 @@ static int sox_read_header(AVFormatContext *s, if (comment_size && comment_size < UINT_MAX) { char *comment = av_malloc(comment_size+1); + if(!comment) + return AVERROR(ENOMEM); if (avio_read(pb, comment, comment_size) != comment_size) { av_freep(&comment); return AVERROR(EIO); |