[FFmpeg-cvslog] avformat/oggparsecelt/celt_header: fix memleak
Michael Niedermayer
git at videolan.org
Sun Oct 20 16:54:17 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 20 16:38:20 2013 +0200| [b294a4beec24d07903c4aefb8ca26cc154fdd5ac] | committer: Michael Niedermayer
avformat/oggparsecelt/celt_header: fix memleak
Fixes: CID1108605
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b294a4beec24d07903c4aefb8ca26cc154fdd5ac
---
libavformat/oggparsecelt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/oggparsecelt.c b/libavformat/oggparsecelt.c
index 4b6233e..f3c2c1a 100644
--- a/libavformat/oggparsecelt.c
+++ b/libavformat/oggparsecelt.c
@@ -46,7 +46,9 @@ static int celt_header(AVFormatContext *s, int idx)
uint32_t overlap, extra_headers;
priv = av_malloc(sizeof(struct oggcelt_private));
- if (!priv || ff_alloc_extradata(st->codec, 2 * sizeof(uint32_t)))
+ if (!priv)
+ return AVERROR(ENOMEM);
+ if (ff_alloc_extradata(st->codec, 2 * sizeof(uint32_t)) < 0)
return AVERROR(ENOMEM);
version = AV_RL32(p + 28);
/* unused header size field skipped */
More information about the ffmpeg-cvslog
mailing list