]> git.sur5r.net Git - openldap/commitdiff
ITS#7224 check *_names pointer before dereferencing
authorPierangelo Masarati <ando@OpenLDAP.org>
Mon, 9 Apr 2012 22:46:06 +0000 (00:46 +0200)
committerPierangelo Masarati <ando@OpenLDAP.org>
Mon, 9 Apr 2012 22:47:23 +0000 (00:47 +0200)
servers/slapd/at.c
servers/slapd/oc.c

index e4d95541e23965c159c671f411107ebf13c38144..0ae958094b109c83ca6dd6b68f461f56ce4bf95a 100644 (file)
@@ -232,6 +232,8 @@ at_delete_names( AttributeType *at )
 {
        char                    **names = at->sat_names;
 
+       if (!names) return;
+
        while (*names) {
                struct aindexrec        tmpair, *air;
 
index df56e4d22f5f0ece0979d6ca69a80fe75a7e1a66..2dbe6fc285ea9e439fe1572c84bd159a2764c51a 100644 (file)
@@ -400,6 +400,8 @@ oc_delete_names( ObjectClass *oc )
 {
        char                    **names = oc->soc_names;
 
+       if (!names) return;
+
        while (*names) {
                struct oindexrec        tmpoir, *oir;