Blame SOURCES/0004-extensions-time-Avoid-undefined-shift.patch

621646
From bda4f46d1a474e5cc13712a0302adcf723e3cc5c Mon Sep 17 00:00:00 2001
621646
From: Phil Sutter <phil@nwl.cc>
621646
Date: Thu, 5 Dec 2019 13:15:01 +0100
621646
Subject: [PATCH] extensions: time: Avoid undefined shift
621646
621646
Value 1 is signed by default and left-shifting by 31 is undefined for
621646
those. Fix this by marking the value as unsigned.
621646
621646
Fixes: ad326ef9f734a ("Add the libxt_time iptables match")
621646
(cherry picked from commit 98b221002960040bf3505811c06025b6b9b6984b)
621646
Signed-off-by: Phil Sutter <psutter@redhat.com>
621646
---
621646
 extensions/libxt_time.c | 2 +-
621646
 1 file changed, 1 insertion(+), 1 deletion(-)
621646
621646
diff --git a/extensions/libxt_time.c b/extensions/libxt_time.c
621646
index 5a8cc5de13031..d001f5b7f448f 100644
621646
--- a/extensions/libxt_time.c
621646
+++ b/extensions/libxt_time.c
621646
@@ -330,7 +330,7 @@ static void time_print_monthdays(uint32_t mask, bool human_readable)
621646
 
621646
 	printf(" ");
621646
 	for (i = 1; i <= 31; ++i)
621646
-		if (mask & (1 << i)) {
621646
+		if (mask & (1u << i)) {
621646
 			if (nbdays++ > 0)
621646
 				printf(",");
621646
 			printf("%u", i);
621646
-- 
621646
2.24.0
621646