[FFmpeg-cvslog] fixup_vorbis_headers: add missing malloc failure check
Michael Niedermayer
git at videolan.org
Wed Jan 30 20:13:43 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan 30 19:58:25 2013 +0100| [033f1644b59abd755bb529afa5db394d18d9c30b] | committer: Michael Niedermayer
fixup_vorbis_headers: add missing malloc failure check
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=033f1644b59abd755bb529afa5db394d18d9c30b
---
libavformat/oggparsevorbis.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 452d856..0b52bc7 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;
More information about the ffmpeg-cvslog
mailing list