[FFmpeg-cvslog] avformat/vividas: check if size is enough big in xor_block
Paul B Mahol
git at videolan.org
Sat Dec 22 12:16:15 EET 2018
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Dec 22 10:45:22 2018 +0100| [e9909fe194181d99148ed7f2c605866dfef6c72a] | committer: Paul B Mahol
avformat/vividas: check if size is enough big in xor_block
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e9909fe194181d99148ed7f2c605866dfef6c72a
---
libavformat/vividas.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index dc446929c3..ecbe47765c 100644
--- a/libavformat/vividas.c
+++ b/libavformat/vividas.c
@@ -129,11 +129,12 @@ static void xor_block(void *p1, void *p2, unsigned size, int key, unsigned *key_
size >>= 2;
- while (size--) {
+ while (size > 0) {
*d2 = *d1 ^ k;
k += key;
d1++;
d2++;
+ size--;
}
*key_ptr = k;
More information about the ffmpeg-cvslog
mailing list