From: Kurt Zeilenga Date: Sat, 17 Jan 2004 19:18:37 +0000 (+0000) Subject: sizeof(HEADER) fix X-Git-Tag: OPENLDAP_REL_ENG_2_2_5~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5c1b2fabb27989a901564e40be14e196309fe1f2;p=openldap sizeof(HEADER) fix --- diff --git a/libraries/libldap/dnssrv.c b/libraries/libldap/dnssrv.c index 0baaf875ad..4ef1e18b68 100644 --- a/libraries/libldap/dnssrv.c +++ b/libraries/libldap/dnssrv.c @@ -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;