Browse Source

avformat/oggparseogm: Check ff_alloc_extradata() for failure

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.4
Michael Niedermayer 9 years ago
parent
commit
9eff4b0d2b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/oggparseogm.c

+ 2
- 1
libavformat/oggparseogm.c View File

@@ -110,7 +110,8 @@ ogm_header(AVFormatContext *s, int idx)
size -= 52;
if (bytestream2_get_bytes_left(&p) < size)
return AVERROR_INVALIDDATA;
ff_alloc_extradata(st->codecpar, size);
if (ff_alloc_extradata(st->codecpar, size) < 0)
return AVERROR(ENOMEM);
bytestream2_get_buffer(&p, st->codecpar->extradata, st->codecpar->extradata_size);
}
}


Loading…
Cancel
Save