Blame SOURCES/0073-LDAP-Fix-Dereference-after-NULL-check.patch

b2d430
From 33649cb41206f568e2bef582e13edbc721184a29 Mon Sep 17 00:00:00 2001
b2d430
From: Lukas Slebodnik <lslebodn@redhat.com>
b2d430
Date: Mon, 8 Aug 2016 09:03:47 +0200
b2d430
Subject: [PATCH 73/74] LDAP: Fix Dereference after NULL check
b2d430
MIME-Version: 1.0
b2d430
Content-Type: text/plain; charset=UTF-8
b2d430
Content-Transfer-Encoding: 8bit
b2d430
b2d430
The commit dc30c60f166ad9adc63a47a1013508a71624ac87
b2d430
changed the logic in NULL check
b2d430
 -    if (protocol) {
b2d430
 +    if (protocol == NULL) {
b2d430
b2d430
Found by Coverity:
b2d430
b2d430
Reviewed-by: Petr Čech <pcech@redhat.com>
b2d430
---
b2d430
 src/providers/ldap/ldap_id_services.c | 2 +-
b2d430
 1 file changed, 1 insertion(+), 1 deletion(-)
b2d430
b2d430
diff --git a/src/providers/ldap/ldap_id_services.c b/src/providers/ldap/ldap_id_services.c
b2d430
index e91fc52d731eaa22be7e98365fc75e7057cb8f1f..638cb619b39f135307090dcf0f2c6ab2cc4119d0 100644
b2d430
--- a/src/providers/ldap/ldap_id_services.c
b2d430
+++ b/src/providers/ldap/ldap_id_services.c
b2d430
@@ -114,7 +114,7 @@ services_get_send(TALLOC_CTX *mem_ctx,
b2d430
     ret = sss_filter_sanitize(state, name, &clean_name);
b2d430
     if (ret != EOK)  goto error;
b2d430
 
b2d430
-    if (protocol == NULL) {
b2d430
+    if (protocol != NULL) {
b2d430
         ret = sss_filter_sanitize(state, protocol, &clean_protocol);
b2d430
         if (ret != EOK)  goto error;
b2d430
     }
b2d430
-- 
b2d430
2.4.11
b2d430