diff options
author | Pavel Březina <pbrezina@redhat.com> | 2013-02-12 11:12:59 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-02-14 14:04:47 +0100 |
commit | 07b92f78d1751d8a2a538a440e1fdb24c59021e0 (patch) | |
tree | 21236d4b551b04149adfae9d486756d7f5e0124f /src | |
parent | 27cf6c28bc02e7a54487d44c212a98b165a70c34 (diff) | |
download | sssd2-07b92f78d1751d8a2a538a440e1fdb24c59021e0.tar.gz sssd2-07b92f78d1751d8a2a538a440e1fdb24c59021e0.tar.xz sssd2-07b92f78d1751d8a2a538a440e1fdb24c59021e0.zip |
get_next_domain() test dom->parent->next for NULL
Otherwise dom may be set to NULL and we will segfault when
dereferencing dom.
Diffstat (limited to 'src')
-rw-r--r-- | src/util/domain_info_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c index d8ca55da..039d66f8 100644 --- a/src/util/domain_info_utils.c +++ b/src/util/domain_info_utils.c @@ -33,7 +33,7 @@ struct sss_domain_info *get_next_domain(struct sss_domain_info *domain, dom = dom->subdomains; } else if (dom->next) { dom = dom->next; - } else if (descend && IS_SUBDOMAIN(dom)) { + } else if (descend && IS_SUBDOMAIN(dom) && dom->parent->next) { dom = dom->parent->next; } else { return NULL; |