ogg: check memory allocations
Bug-Id: CID 1257795 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
committed by
Luca Barbato
parent
53367b34e1
commit
b4cda0a999
@@ -444,6 +444,8 @@ 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 (!(s->flags & AVFMT_FLAG_BITEXACT))
|
if (!(s->flags & AVFMT_FLAG_BITEXACT))
|
||||||
|
Reference in New Issue
Block a user