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

Andreas Rheinhardt git at videolan.org
Fri Nov 11 13:32:09 EET 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Nov  8 00:24:25 2022 +0100| [c124981b7964423537a26d04ed64cdaa37bf4039] | committer: Andreas Rheinhardt

avutil/cast5: Avoid undefined shift of uint32_t by 32 places

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c124981b7964423537a26d04ed64cdaa37bf4039
---

 libavutil/cast5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 {                                                                                             \



More information about the ffmpeg-cvslog mailing list