Browse Source

fixup_vorbis_headers: add missing malloc failure check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.2
Michael Niedermayer 12 years ago
parent
commit
033f1644b5
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/oggparsevorbis.c

+ 2
- 0
libavformat/oggparsevorbis.c View File

@@ -179,6 +179,8 @@ fixup_vorbis_headers(AVFormatContext * as, struct oggvorbis_private *priv,
len = priv->len[0] + priv->len[1] + priv->len[2];
buf_len = len + len/255 + 64;
ptr = *buf = av_realloc(NULL, buf_len);
if (!*buf)
return 0;
memset(*buf, '\0', buf_len);

ptr[0] = 2;


Loading…
Cancel
Save