ehlo, Clang static analyzer assume that ldb_search can found 0 entries in the tree "cn=sysdb". Thenvariable version could be used uninitialized.
We cannot get to such state in sssd but we already handle a case for more then one entry. LS
>From 88da8ca30fbf50c320cd2bf4d79d84925cb0883c Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik <lsleb...@redhat.com> Date: Tue, 30 Aug 2016 15:16:31 +0200 Subject: [PATCH 1/3] SYSDB: Fix handling of version in sysdb_cache_connect_helper Clang static analyzer assume that ldb_search can found 0 entries in the tree "cn=sysdb". Thenvariable version could be used uninitialized. We cannot get to such state in sssd but we already handle a case for more then one entry. --- src/db/sysdb_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/sysdb_init.c b/src/db/sysdb_init.c index d110aa7a2878e47650db177cfd342d0ac32248ab..0a794899d029d8e45dc133d9bb45444f4b083771 100644 --- a/src/db/sysdb_init.c +++ b/src/db/sysdb_init.c @@ -572,7 +572,7 @@ static errno_t sysdb_cache_connect_helper(TALLOC_CTX *mem_ctx, ret = EIO; goto done; } - if (res->count > 1) { + if (res->count != 1) { ret = EIO; goto done; } -- 2.9.3
_______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org