mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
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>
This commit is contained in:
@@ -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 *
|
||||
|
||||
Reference in New Issue
Block a user