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

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