aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/g2meet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c
index 19e1c130ce..731d29a5d4 100644
--- a/libavcodec/g2meet.c
+++ b/libavcodec/g2meet.c
@@ -244,6 +244,9 @@ static int jpg_decode_block(JPGContext *c, GetBitContext *gb,
const int is_chroma = !!plane;
const uint8_t *qmat = is_chroma ? chroma_quant : luma_quant;
+ if (get_bits_left(gb) < 1)
+ return AVERROR_INVALIDDATA;
+
c->bdsp.clear_block(block);
dc = get_vlc2(gb, c->dc_vlc[is_chroma].table, 9, 3);
if (dc < 0)