From d7d1789e8077d97077abe9d0ee4f397d3f390a3f Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 10 Apr 2012 00:46:06 +0200 Subject: [PATCH] ITS#7224 check *_names pointer before dereferencing --- servers/slapd/at.c | 2 ++ servers/slapd/oc.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/servers/slapd/at.c b/servers/slapd/at.c index e4d95541e2..0ae958094b 100644 --- a/servers/slapd/at.c +++ b/servers/slapd/at.c @@ -232,6 +232,8 @@ at_delete_names( AttributeType *at ) { char **names = at->sat_names; + if (!names) return; + while (*names) { struct aindexrec tmpair, *air; diff --git a/servers/slapd/oc.c b/servers/slapd/oc.c index df56e4d22f..2dbe6fc285 100644 --- a/servers/slapd/oc.c +++ b/servers/slapd/oc.c @@ -400,6 +400,8 @@ oc_delete_names( ObjectClass *oc ) { char **names = oc->soc_names; + if (!names) return; + while (*names) { struct oindexrec tmpoir, *oir; -- 2.39.5