summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-05-15 10:09:08 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-05-15 11:49:02 +0200
commit574061e65d3fb687b9cb2c757afa1fe92812245e (patch)
treea06c5f8fb876d4eaf1cd31b8c89f4b75bffba603
parent2fa8d6655ac37f9bdeb34420000052d921f4a543 (diff)
downloadsssd-574061e65d3fb687b9cb2c757afa1fe92812245e.tar.gz
sssd-574061e65d3fb687b9cb2c757afa1fe92812245e.tar.bz2
sssd-574061e65d3fb687b9cb2c757afa1fe92812245e.zip
Fix segfault in AD Subdomains Module
In function ad_subdomains_get_netlogon_done: If variable "reply_count" is zero then variable "reply" will not be initialized. Therefore we should not continue.
-rw-r--r--src/providers/ad/ad_subdomains.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
index 1da343f8..2ad318f6 100644
--- a/src/providers/ad/ad_subdomains.c
+++ b/src/providers/ad/ad_subdomains.c
@@ -307,6 +307,8 @@ static void ad_subdomains_get_netlogon_done(struct tevent_req *req)
if (reply_count == 0) {
DEBUG(SSSDBG_TRACE_FUNC, ("No netlogon data available.\n"));
+ ret = ENOENT;
+ goto done;
} else if (reply_count > 1) {
DEBUG(SSSDBG_OP_FAILURE,
("More than one netlogon info returned.\n"));