Commit 0f629823 authored by James Almer's avatar James Almer Committed by Michael Niedermayer

oggenc: check return value of av_mallocz()

Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 35617366
...@@ -427,6 +427,9 @@ static int ogg_write_header(AVFormatContext *s) ...@@ -427,6 +427,9 @@ static int ogg_write_header(AVFormatContext *s)
return -1; return -1;
} }
oggstream = av_mallocz(sizeof(*oggstream)); oggstream = av_mallocz(sizeof(*oggstream));
if (!oggstream)
return AVERROR(ENOMEM);
oggstream->page.stream_index = i; oggstream->page.stream_index = i;
if (!(st->codec->flags & CODEC_FLAG_BITEXACT)) if (!(st->codec->flags & CODEC_FLAG_BITEXACT))
......
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