This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch hotfix/coverity_fix
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 9e8cb0cb5de9c03789e5e76b4f7d444a9915cfff
Author: PengZheng <[email protected]>
AuthorDate: Mon Apr 10 18:22:38 2023 +0800

    Fix Coverity 218470 Explicit null dereferenced.
---
 libs/framework/include/celix/dm/DependencyManager_Impl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/framework/include/celix/dm/DependencyManager_Impl.h 
b/libs/framework/include/celix/dm/DependencyManager_Impl.h
index e7c71982..428f22b1 100644
--- a/libs/framework/include/celix/dm/DependencyManager_Impl.h
+++ b/libs/framework/include/celix/dm/DependencyManager_Impl.h
@@ -176,7 +176,7 @@ static celix::dm::DependencyManagerInfo 
createDepManInfoFromC(celix_dependency_m
             intInfo.serviceName = std::string{cIntInfo->name};
             const char* key;
             CELIX_PROPERTIES_FOR_EACH(cIntInfo->properties, key) {
-                const char* val =celix_properties_get(cIntInfo->properties, 
key, nullptr);
+                const char* val =celix_properties_get(cIntInfo->properties, 
key, "");
                 intInfo.properties[std::string{key}] = std::string{val};
             }
             cmpInfo.interfacesInfo.emplace_back(std::move(intInfo));

Reply via email to