代码拉取完成,页面将自动刷新
From 01a0a556018694bfaf6b01a5a40f8d0d10641a1f Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 18 May 2023 10:26:02 +0200
Subject: [PATCH] lib/caputils: fix integer handling issues [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
---
lib/caputils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/caputils.c b/lib/caputils.c
index 3041c3078..23866c071 100644
--- a/lib/caputils.c
+++ b/lib/caputils.c
@@ -119,7 +119,7 @@ void cap_permitted_to_ambient(void)
if (cap > (uint64_t) cap_last_cap())
continue;
- if ((effective & (1 << cap))
+ if ((effective & (1ULL << cap))
&& prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, cap, 0, 0) < 0)
err(EXIT_FAILURE, _("prctl(PR_CAP_AMBIENT) failed"));
}
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。