andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
Blob Blame History Raw
From 9278a336aecae7a2d31e7d8dc942f27797cea339 Mon Sep 17 00:00:00 2001
From: Noriko Hosoi <nhosoi@redhat.com>
Date: Fri, 15 Aug 2014 12:38:24 -0700
Subject: [PATCH 247/251] Ticket #415 - winsync doesn't sync DN valued
 attributes if DS DN value doesn't exist

Description:
Once we had a NULL vs checking (Ticket #415):
commit 737169e0afd0547b6de0a61081508314d076cc6a,
but it was accidentally removed by the next commit (Ticket 346):
commit 890fc22687821279f3862fc0862a4e8d93c00291.

This patch adds the NULL checking for vs.
(cherry picked from commit 19e4ea683835ec9a40317e1c9b30fe87229aea39)
---
 ldap/servers/slapd/valueset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ldap/servers/slapd/valueset.c b/ldap/servers/slapd/valueset.c
index 5c1ae36..52c04b8 100644
--- a/ldap/servers/slapd/valueset.c
+++ b/ldap/servers/slapd/valueset.c
@@ -713,7 +713,7 @@ Slapi_Value *
 slapi_valueset_find(const Slapi_Attr *a, const Slapi_ValueSet *vs, const Slapi_Value *v)
 {
 	Slapi_Value *r= NULL;
-	if(vs->num > 0) {
+	if(vs && (vs->num > 0)) {
 		if (vs->sorted) {
 			r = valueset_find_sorted(a,vs,v,NULL);
 		} else {
-- 
1.8.1.4