diff options
-rw-r--r-- | src/libffmpeg/libavcodec/mjpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libffmpeg/libavcodec/mjpeg.c b/src/libffmpeg/libavcodec/mjpeg.c index 48f528f88..5502083ab 100644 --- a/src/libffmpeg/libavcodec/mjpeg.c +++ b/src/libffmpeg/libavcodec/mjpeg.c @@ -1681,7 +1681,7 @@ static int find_marker(uint8_t **pbuf_ptr, uint8_t *buf_end) while (buf_ptr < buf_end) { v = *buf_ptr++; v2 = *buf_ptr; - if ((v == 0xff) && (v2 >= 0xc0) && (v2 <= 0xfe)) { + if ((v == 0xff) && (v2 >= 0xc0) && (v2 <= 0xfe) && buf_ptr < buf_end) { val = *buf_ptr++; goto found; } |