avformat/vividas: fix misaligned access
Fixes: ffmpeg_xor_block_libavformat_vividas.c_134_15.poc Found-by: iceray-Li Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
michaelni
parent
197f854a2e
commit
84a48165f0
@@ -131,7 +131,7 @@ static void xor_block(void *p1, void *p2, unsigned size, int key, unsigned *key_
|
||||
size >>= 2;
|
||||
|
||||
while (size > 0) {
|
||||
*d2 = *d1 ^ (HAVE_BIGENDIAN ? av_bswap32(k) : k);
|
||||
AV_WN32(d2, AV_RN32(d1) ^ (HAVE_BIGENDIAN ? av_bswap32(k) : k));
|
||||
k += key;
|
||||
d1++;
|
||||
d2++;
|
||||
|
||||
Reference in New Issue
Block a user