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

This commit is contained in:
Paul B Mahol 2018-12-22 10:45:22 +01:00
parent 14c2f7f652
commit e9909fe194

View File

@ -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;