]> git.sur5r.net Git - openldap/commitdiff
sizeof(HEADER) fix
authorKurt Zeilenga <kurt@openldap.org>
Sat, 17 Jan 2004 19:18:37 +0000 (19:18 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 17 Jan 2004 19:18:37 +0000 (19:18 +0000)
libraries/libldap/dnssrv.c

index 0baaf875ad04a7e585da91f9089f10019150a4dd..4ef1e18b68b9b0e68b0e0a2ebd8b1d7f2b702dfc 100644 (file)
@@ -226,13 +226,18 @@ int ldap_domain2hostlist(
 
        /* Parse out query */
        p = reply;
+
 #ifdef NS_HFIXEDSZ
        /* Bind 8/9 interface */
        p += NS_HFIXEDSZ;
-#else
-       /* Bind 4 interface */
+#elif defined(HFIXEDSZ)
+       /* Bind 4 interface w/ HFIXEDSZ */
        p += HFIXEDSZ;
+#else
+       /* Bind 4 interface w/o HFIXEDSZ */
+       p += sizeof(HEADER);
 #endif
+
        status = dn_expand(reply, reply + len, p, host, sizeof(host));
        if (status < 0) {
            goto out;