aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-09 02:29:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-09 03:09:26 +0200
commit6d3bcbb2114da4c3509dc4f6f68a9349590fb477 (patch)
tree9f367a5477bd779c149ff2b83281e84387590341 /libavcodec
parentc153ea4756ce41b9d09f864972b3bffe0ac0b8d4 (diff)
downloadffmpeg-6d3bcbb2114da4c3509dc4f6f68a9349590fb477.tar.gz
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@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/g2meet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c
index 51ec5bb2e7..8eb310bd8d 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;