aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-30 19:58:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-30 20:04:14 +0100
commit033f1644b59abd755bb529afa5db394d18d9c30b (patch)
tree723de153b8c9e3ce28981af801338caa1b7b7307
parent0451ff295a9f5194c2dee87a9a704b6dcd144ddb (diff)
downloadffmpeg-033f1644b59abd755bb529afa5db394d18d9c30b.tar.gz
fixup_vorbis_headers: add missing malloc failure check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/oggparsevorbis.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 452d8565c1..0b52bc7c17 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -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;