git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a928ed3
)
xxan: don't read before start of buffer in av_memcpy_backptr().
author
Ronald S. Bultje
<rsbultje@gmail.com>
Fri, 9 Mar 2012 00:32:46 +0000
(16:32 -0800)
committer
Ronald S. Bultje
<rsbultje@gmail.com>
Sat, 10 Mar 2012 19:48:39 +0000
(11:48 -0800)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
libavcodec/xxan.c
patch
|
blob
|
history
diff --git
a/libavcodec/xxan.c
b/libavcodec/xxan.c
index
4659d34
..
8147bad
100644
(file)
--- a/
libavcodec/xxan.c
+++ b/
libavcodec/xxan.c
@@
-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;