From 31f06b91af060d8df39dd4caed81e41aa5a25dc4 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 25 Feb 2008 16:18:36 +0000 Subject: [PATCH] don't try to dereference NULL pointer (ITS#5388) --- servers/slapd/oc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers/slapd/oc.c b/servers/slapd/oc.c index 8f1bd67ebc..0dd04d75c7 100644 --- a/servers/slapd/oc.c +++ b/servers/slapd/oc.c @@ -502,6 +502,10 @@ oc_next( ObjectClass **oc ) } #endif + if ( *oc == NULL ) { + return 0; + } + *oc = LDAP_STAILQ_NEXT(*oc,soc_next); return (*oc != NULL); -- 2.39.5