mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avformat/vividas: check if size is enough big in xor_block
This commit is contained in:
parent
14c2f7f652
commit
e9909fe194
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user