[FFmpeg-cvslog] tak_parser: check ff_combine_frame() return code

Michael Niedermayer git at videolan.org
Sat Oct 27 23:06:40 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 27 22:45:51 2012 +0200| [189fbcede89bb5d7ec6c3b05d1e30f1bab3a060a] | committer: Michael Niedermayer

tak_parser: check ff_combine_frame() return code

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

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

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

diff --git a/libavcodec/tak_parser.c b/libavcodec/tak_parser.c
index dcc37ec..55766a4 100644
--- a/libavcodec/tak_parser.c
+++ b/libavcodec/tak_parser.c
@@ -66,7 +66,8 @@ static int tak_parse(AVCodecParserContext *s, AVCodecContext *avctx,
             int tmp_buf_size = FFMIN(2 * TAK_MAX_FRAME_HEADER_BYTES, buf_size);
             const uint8_t *tmp_buf = buf;
 
-            ff_combine_frame(pc, END_NOT_FOUND, &tmp_buf, &tmp_buf_size);
+            if (ff_combine_frame(pc, END_NOT_FOUND, &tmp_buf, &tmp_buf_size) != -1)
+                return AVERROR(ENOMEM);
             consumed += tmp_buf_size;
             buf      += tmp_buf_size;
             buf_size -= tmp_buf_size;



More information about the ffmpeg-cvslog mailing list