mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-28 22:10:34 +00:00
roqvideodec: improve end of input buffer check
This fixes a out of array read. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1eb7f39c7b
commit
7a7b1f5c4d
@ -44,7 +44,7 @@ static void roqvideo_decode_frame(RoqContext *ri)
|
||||
const unsigned char *buf = ri->buf;
|
||||
const unsigned char *buf_end = ri->buf + ri->size;
|
||||
|
||||
while (buf < buf_end) {
|
||||
while (buf + 8 <= buf_end) {
|
||||
chunk_id = bytestream_get_le16(&buf);
|
||||
chunk_size = bytestream_get_le32(&buf);
|
||||
chunk_arg = bytestream_get_le16(&buf);
|
||||
|
Loading…
Reference in New Issue
Block a user