diff mbox series

[FFmpeg-devel] avutil/cast5: Avoid undefined shift of uint32_t by 32 places

Message ID AS8P250MB0744F0C2F45C9D2570EDA88F8F3F9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit c124981b7964423537a26d04ed64cdaa37bf4039
Headers show
Series [FFmpeg-devel] avutil/cast5: Avoid undefined shift of uint32_t by 32 places | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Nov. 8, 2022, midnight UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavutil/cast5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavutil/cast5.c b/libavutil/cast5.c
index 0bf8ae9929..e1d2c5cadd 100644
--- a/libavutil/cast5.c
+++ b/libavutil/cast5.c
@@ -32,7 +32,7 @@ 
 #define IC(x) (((x) >> 8) & 0xff)
 #define ID(x) ((x) & 0xff)
 
-#define LR(x, c) (((x) << (c)) | ((x) >> (32 - (c))))
+#define LR(x, c) (((x) << (c)) | ((x) >> ((32 - (c)) & 31)))
 
 #define F3(l, r, i)                                                                                  \
     do {                                                                                             \