519. [bug] dns_name_split() would improperly split some bitstring
labels, zeroing a few of the least signficant bits in
the prefix part. When such an improperly created
prefix was returned to the RBT database, the bogus
label was dutifully stored, corrupting the tree.
[RT #369]
+ 519. [bug] dns_name_split() would improperly split some bitstring
+ labels, zeroing a few of the least signficant bits in
+ the prefix part. When such an improperly created
+ prefix was returned to the RBT database, the bogus
+ label was dutifully stored, corrupting the tree.
+ [RT #369]
+
518. [bug] The resolver did not realize that a DNAME which was
"the answer" to the client's query was "the answer",
and such queries would fail. [RT #399]
* SOFTWARE.
*/
-/* $Id: name.c,v 1.93 2000/06/22 21:54:32 tale Exp $ */
+/* $Id: name.c,v 1.93.2.1 2000/10/16 23:32:34 bwelling Exp $ */
#include <config.h>
memcpy(dst, src, len);
} else {
+ /*
+ * p is adjusted to point to the last byte of
+ * the starting bitstring label to make it
+ * cheap to determine when bits from the next
+ * byte should be shifted into the low order
+ * bits of the current byte.
+ */
+ p = src + (mod + *p - 1) / 8;
+
while (len--) {
*dst = *src++ << mod;
/*
* against arithmetic sign extension
* by the right shift.
*/
- if (len > 0)
+ if (src <= p)
*dst++ |=
(*src >> (8 - mod)) &
~(0xFF << mod);