Commit 4acea512 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

lavc/mjpegdec: Do not overread too short JFIF tags.

Fixes ticket #6055.
parent b7a6d28e
......@@ -1670,6 +1670,8 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
if (id == AV_RB32("JFIF")) {
int t_w, t_h, v1, v2;
if (len < 8)
goto out;
skip_bits(&s->gb, 8); /* the trailing zero-byte */
v1 = get_bits(&s->gb, 8);
v2 = get_bits(&s->gb, 8);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment