Fetch the repository succeeded.
This action will force synchronization from src-openEuler/glibc, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
From f5b9e0f2a8ada29cebeb6e51cbcbea396375ab26 Mon Sep 17 00:00:00 2001
From: huangyu <huangyu106@huawei.com>
Date: Wed, 7 Dec 2022 14:35:26 +0800
Subject: [PATCH] fix Segmentation fault in nss module
Signed-off-by: huangyu <huangyu106@huawei.com>
---
nss/nss_module.c | 2 +-
nss/nsswitch.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/nss/nss_module.c b/nss/nss_module.c
index b28cb94a..bb2807e9 100644
--- a/nss/nss_module.c
+++ b/nss/nss_module.c
@@ -352,7 +352,7 @@ nss_load_all_libraries (enum nss_database service)
{
nss_action_list ni = NULL;
- if (__nss_database_get (service, &ni))
+ if (__nss_database_get (service, &ni) && ni != NULL)
while (ni->module != NULL)
{
__nss_module_load (ni->module);
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 6b7d4c78..c9d7e372 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -133,7 +133,7 @@ libc_hidden_def (__nss_next2)
void *
__nss_lookup_function (nss_action_list ni, const char *fct_name)
{
- if (ni->module == NULL)
+ if (ni == NULL || ni->module == NULL)
return NULL;
return __nss_module_get_function (ni->module, fct_name);
}
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。