Commit 1dcce49e authored by Michael Niedermayer's avatar Michael Niedermayer

soxdec: check av_malloc return.

Bug found by: durandal_1707
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1d0ae92a
......@@ -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);
......
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