代码拉取完成,页面将自动刷新
From 5379f5838df01fa22298a2b4f28270fd6b4cb871 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Mon, 6 Nov 2023 11:40:27 +0100
Subject: [PATCH] libmount: fix possible NULL dereference [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
---
libmount/src/tab.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libmount/src/tab.c b/libmount/src/tab.c
index be0c13a..a19a5ae 100644
--- a/libmount/src/tab.c
+++ b/libmount/src/tab.c
@@ -659,7 +659,7 @@ int mnt_table_next_child_fs(struct libmnt_table *tb, struct libmnt_iter *itr,
{
struct libmnt_fs *fs;
int parent_id, lastchld_id = 0, chld_id = 0;
- int direction = mnt_iter_get_direction(itr);
+ int direction;
if (!tb || !itr || !parent || !is_mountinfo(tb))
return -EINVAL;
@@ -668,6 +668,7 @@ int mnt_table_next_child_fs(struct libmnt_table *tb, struct libmnt_iter *itr,
mnt_fs_get_target(parent)));
parent_id = mnt_fs_get_id(parent);
+ direction = mnt_iter_get_direction(itr);
/* get ID of the previously returned child */
if (itr->head && itr->p != itr->head) {
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。