]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/soxdec.c
soxdec: check av_malloc return.
[ffmpeg] / libavformat / soxdec.c
index ad8f48896165a1210310dec5582c09608d93aff4..23fea38fd4b33878316c1d3ebe22fe05a76ed519 100644 (file)
@@ -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);