Skip to content

Commit

Permalink
avformat/oggparseogm: Check ff_alloc_extradata() for failure
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Apr 11, 2017
1 parent 170d864 commit 9eff4b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libavformat/oggparseogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 9eff4b0

Please sign in to comment.