[FFmpeg-cvslog] avcodec/g2meet: check framebuf has been allocated before use

Michael Niedermayer git at videolan.org
Sun Jun 9 12:05:35 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun  9 02:29:35 2013 +0200| [6d3bcbb2114da4c3509dc4f6f68a9349590fb477] | committer: Michael Niedermayer

avcodec/g2meet: check framebuf has been allocated before use

Fixes null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/g2meet.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c
index 51ec5bb..8eb310b 100644
--- a/libavcodec/g2meet.c
+++ b/libavcodec/g2meet.c
@@ -759,7 +759,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
     if (got_header)
         c->got_header = 1;
 
-    if (c->width && c->height) {
+    if (c->width && c->height && c->framebuf) {
         if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) {
             av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
             return ret;



More information about the ffmpeg-cvslog mailing list