label_len = remain - 1;
msg_err ("no buffer remain for constructing query, strip to %ud", label_len);
}
+ if (label_len == 0) {
+ /* Two dots in order, skip this */
+ msg_info ("name contains two or more dots in a row, replace it with one dot");
+ begin = dot + 1;
+ continue;
+ }
/* First try to compress name */
if (! try_compress_label (req->pool, pos, req->packet, end - begin, begin, table)) {
*pos++ = (guint8)label_len;
(int)(hostname->len - (dots[2] - hostname->begin + 1)),
dots[2] + 1,
(int)(dots[2] - dots[1] - 1),
- dots[1],
+ dots[1] + 1,
(int)(dots[1] - dots[0] - 1),
- dots[0],
+ dots[0] + 1,
(int)(dots[0] - hostname->begin),
hostname->begin);
}