+2004-10-19 Tom Yu <tlyu@mit.edu>
+
+ * dnsglue.c (initparse): Skip query type and class when we lack
+ ns_initparse().
+ (krb5int_dns_nextans) [!HAVE_NS_INITPARSE]: Pass correct pointer
+ to dn_skipname(). Actually skip the RR name.
+
2004-10-18 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (TEST_PROGS): Add t_locate_kdc.
len = dn_expand(ds->ansp, (unsigned char *)ds->ansp + ds->anslen,
p, host, sizeof(host));
#endif
- if (len < 0 || !INCR_OK(ds->ansp, ds->anslen, p, len))
+ if (len < 0 || !INCR_OK(ds->ansp, ds->anslen, p, len + 4))
return -1;
- p += len;
+ p += len + 4;
}
ds->ptr = p;
ds->nanswers = nanswers;
while (ds->nanswers--) {
#if HAVE_DN_SKIPNAME
- len = dn_skipname(ds->ansp, (unsigned char *)ds->ansp + ds->anslen);
+ len = dn_skipname(p, (unsigned char *)ds->ansp + ds->anslen);
#else
len = dn_expand(ds->ansp, (unsigned char *)ds->ansp + ds->anslen,
p, host, sizeof(host));
#endif
if (len < 0 || !INCR_OK(ds->ansp, ds->anslen, p, len))
return -1;
+ p += len;
SAFE_GETUINT16(ds->ansp, ds->anslen, p, 2, ntype, out);
/* Also skip 4 bytes of TTL */
SAFE_GETUINT16(ds->ansp, ds->anslen, p, 6, nclass, out);
ds->ptr = p + rdlen;
return 0;
}
+ p += rdlen;
}
return 0;
out: