fixup_vorbis_headers: add missing malloc failure check
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 30 Jan 2013 18:58:25 +0000 (19:58 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 30 Jan 2013 19:04:14 +0000 (20:04 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/oggparsevorbis.c

index 452d856..0b52bc7 100644 (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;