Commit 7a7b1f5c authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1eb7f39c
......@@ -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);
......
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