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 7cab01c74..1b6b15c4a 100644 --- a/src/libffmpeg/libavcodec/mjpeg.c +++ b/src/libffmpeg/libavcodec/mjpeg.c @@ -1667,7 +1667,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 ((buf_ptr < buf_end) && (v == 0xff) && (v2 >= 0xc0) && (v2 <= 0xfe)) { val = *buf_ptr++; goto found; } |