mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-31 20:02:07 +00:00
oggparsevorbis.c: Check for OOM when using av_mallocz.
This commit is contained in:
parent
517dcc9b5f
commit
84aea80f78
@ -223,6 +223,8 @@ vorbis_header (AVFormatContext * s, int idx)
|
||||
|
||||
priv->len[pkt_type >> 1] = os->psize;
|
||||
priv->packet[pkt_type >> 1] = av_mallocz(os->psize);
|
||||
if (!priv->packet[pkt_type >> 1])
|
||||
return AVERROR(ENOMEM);
|
||||
memcpy(priv->packet[pkt_type >> 1], os->buf + os->pstart, os->psize);
|
||||
if (os->buf[os->pstart] == 1) {
|
||||
const uint8_t *p = os->buf + os->pstart + 7; /* skip "\001vorbis" tag */
|
||||
|
Loading…
Reference in New Issue
Block a user