Skip to content

Commit 8f17581

Browse files
committed
aes: fix for big endian systems
This was missed in 5d20f19 since CONFIG_SMALL was always broken for big endian. Signed-off-by: Mans Rullgard <[email protected]>
1 parent 66fe597 commit 8f17581

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libavutil/aes.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ static uint32_t enc_multbl[4][256];
5454
static uint32_t dec_multbl[4][256];
5555
#endif
5656

57-
#define ROT(x, s) ((x << s) | (x >> (32-s)))
57+
#if HAVE_BIGENDIAN
58+
# define ROT(x, s) ((x >> s) | (x << (32-s)))
59+
#else
60+
# define ROT(x, s) ((x << s) | (x >> (32-s)))
61+
#endif
5862

5963
static inline void addkey(av_aes_block *dst, const av_aes_block *src,
6064
const av_aes_block *round_key)

0 commit comments

Comments
 (0)