[FFmpeg-cvslog] avformat/oggparsespeex: Check for extradata allocation failure

Michael Niedermayer git at videolan.org
Sun Oct 20 17:03:18 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 20 16:57:45 2013 +0200| [eb5cc8febc6cd7938f8fdce95d78cacdbe1be30b] | committer: Michael Niedermayer

avformat/oggparsespeex: Check for extradata allocation failure

Fixes CID1108574
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eb5cc8febc6cd7938f8fdce95d78cacdbe1be30b
---

 libavformat/oggparsespeex.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/oggparsespeex.c b/libavformat/oggparsespeex.c
index 7cbc7e0..1b9de9c 100644
--- a/libavformat/oggparsespeex.c
+++ b/libavformat/oggparsespeex.c
@@ -77,7 +77,8 @@ static int speex_header(AVFormatContext *s, int idx) {
         if (frames_per_packet)
             spxp->packet_size *= frames_per_packet;
 
-        ff_alloc_extradata(st->codec, os->psize);
+        if (ff_alloc_extradata(st->codec, os->psize) < 0)
+            return AVERROR(ENOMEM);
         memcpy(st->codec->extradata, p, st->codec->extradata_size);
 
         avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);



More information about the ffmpeg-cvslog mailing list