summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2023-05-23 15:29:33 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2023-05-23 15:29:33 -0700
commitbab92cdf6c95ed8cf09ed85122d307891528f094 (patch)
tree661542130e0b3812fdcc7a5f5f60841dbaff49b3 /app-admin/sysstat
parentdev-qt/qtnetwork: drop 5.15.9-r1 (diff)
downloadgentoo-bab92cdf6c95ed8cf09ed85122d307891528f094.tar.gz
gentoo-bab92cdf6c95ed8cf09ed85122d307891528f094.tar.bz2
gentoo-bab92cdf6c95ed8cf09ed85122d307891528f094.zip
app-admin/sysstat: update patch, fix build in 12.6.2-r1
Bug: https://bugs.gentoo.org/880543 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'app-admin/sysstat')
-rw-r--r--app-admin/sysstat/files/sysstat-12.6.2-check_overflow.patch13
1 files changed, 11 insertions, 2 deletions
diff --git a/app-admin/sysstat/files/sysstat-12.6.2-check_overflow.patch b/app-admin/sysstat/files/sysstat-12.6.2-check_overflow.patch
index 3f36fd7ff090..413cdad8b015 100644
--- a/app-admin/sysstat/files/sysstat-12.6.2-check_overflow.patch
+++ b/app-admin/sysstat/files/sysstat-12.6.2-check_overflow.patch
@@ -1,5 +1,14 @@
-Backported upstream fix for the fix for CVE-2022-39377.
+From 954ff2e2673cef48f0ed44668c466eab041db387 Mon Sep 17 00:00:00 2001
+From: Pavel Kopylov <pkopylov@cloudlinux.com>
+Date: Wed, 17 May 2023 11:33:45 +0200
+Subject: [PATCH] Fix an overflow which is still possible for some values.
+---
+ common.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/common.c b/common.c
+index 48493b5f..12cd8d9f 100644
--- a/common.c
+++ b/common.c
@@ -431,8 +431,11 @@ int check_dir(char *dirname)
@@ -12,7 +21,7 @@ Backported upstream fix for the fix for CVE-2022-39377.
+ (((unsigned long long)UINT_MAX / (unsigned long long)val1 <
+ (unsigned long long)val2) ||
+ ((unsigned long long)UINT_MAX / ((unsigned long long)val1 *
-+ (unsigned long long)val2) < (unsigned long long)val3)) {
++ (unsigned long long)val2) < (unsigned long long)val3))) {
#ifdef DEBUG
fprintf(stderr, "%s: Overflow detected (%llu). Aborting...\n",
__FUNCTION__, (unsigned long long) val1 * (unsigned long long) val2 *