xxan: don't read before start of buffer in av_memcpy_backptr().
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit f1279e286b)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
parent
311361348d
commit
5ae49ddaa4
1 changed files with 2 additions and 1 deletions
|
|
@ -129,7 +129,8 @@ static int xan_unpack(uint8_t *dest, const int dest_len,
|
|||
if (size + size2 > dest_end - dest)
|
||||
break;
|
||||
}
|
||||
if (src + size > src_end || dest + size + size2 > dest_end)
|
||||
if (src + size > src_end || dest + size + size2 > dest_end ||
|
||||
dest - orig_dest + size < back)
|
||||
return -1;
|
||||
bytestream_get_buffer(&src, dest, size);
|
||||
dest += size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue