mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
c153ea4756
commit
6d3bcbb211
|
@ -759,7 +759,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
|
||||||
if (got_header)
|
if (got_header)
|
||||||
c->got_header = 1;
|
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) {
|
if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue