]> git.sur5r.net Git - openldap/commitdiff
ITS#328: fix strstr bug (by commenting out bad code). UD_BASE should
authorKurt Zeilenga <kurt@openldap.org>
Wed, 3 Nov 1999 22:05:18 +0000 (22:05 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 3 Nov 1999 22:05:18 +0000 (22:05 +0000)
have been replaced with ldap.conf/ud.conf default handling, not NULL.

CHANGES
clients/ud/util.c

diff --git a/CHANGES b/CHANGES
index cb095c8600696332df3e570a86af17f28ddec911..3327b10515f60d1452cd002b415e57448ef4c00b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,7 @@ Changes included in OpenLDAP 1.2 Release Engineering
        Fixed ldbm db_appinit to use u_int32_t instead of int (ITS#295)
        Fixed lber/io.c Cray T90 specific pointer arithmetic problem (ITS#325)
        Fixed s_addr dereferencing (ITS#340)
+       Fixed ud strstr crash (ITS#328)
        Added TCP_NODELAY support
        Changed slapd to apply ACL to lastmod attributes
        Changed slapd.conf default referral
index 0ee2e609269cbe54d65319dd0155ea2a34ad300b..6edc0320156eecbfc2a6b40462d456d0871881cc 100644 (file)
@@ -523,15 +523,19 @@ isadn( char *s )
 char *
 my_ldap_dn2ufn( char *s )
 {
+#ifdef UD_BASE
        register char **cpp;
        static char short_DN[BUFSIZ];
 
-       if (strstr(s, NULL) == NULL)
+       if (strstr(s, UD_BASE) == NULL)
                return(ldap_dn2ufn(s));
        cpp = ldap_explode_dn(s, TRUE);
        sprintf(short_DN, "%s, %s", *cpp, *(cpp + 1));
        ldap_value_free(cpp);
        return(short_DN);
+#else
+       return(ldap_dn2ufn(s));
+#endif
 }
 
 /* return TRUE if this attribute should be printed as a URL */