Commit e9909fe1 authored by Paul B Mahol's avatar Paul B Mahol

avformat/vividas: check if size is enough big in xor_block

parent 14c2f7f6
...@@ -129,11 +129,12 @@ static void xor_block(void *p1, void *p2, unsigned size, int key, unsigned *key_ ...@@ -129,11 +129,12 @@ static void xor_block(void *p1, void *p2, unsigned size, int key, unsigned *key_
size >>= 2; size >>= 2;
while (size--) { while (size > 0) {
*d2 = *d1 ^ k; *d2 = *d1 ^ k;
k += key; k += key;
d1++; d1++;
d2++; d2++;
size--;
} }
*key_ptr = k; *key_ptr = k;
......
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