Browse Source

soxdec: check av_malloc return.

Bug found by: durandal_1707

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.10
Michael Niedermayer 13 years ago
parent
commit
1dcce49e10
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/soxdec.c

+ 2
- 0
libavformat/soxdec.c View 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);


Loading…
Cancel
Save