Properly initialise local_ndata in isdotlocal in dig
Remove the trailing '\0' so that the length field of the dns_name_t
structure is correct. The old data just happens to work with
dns_name_issubdomain but would fail with dns_name_equal.
(cherry picked from commit 8ce163bbc5)
This commit is contained in:
@@ -588,7 +588,7 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags, isc_buffer_t *buf,
|
||||
static bool
|
||||
isdotlocal(dns_message_t *msg) {
|
||||
isc_result_t result;
|
||||
static unsigned char local_ndata[] = { "\005local\0" };
|
||||
static unsigned char local_ndata[] = { "\005local" };
|
||||
static unsigned char local_offsets[] = { 0, 6 };
|
||||
static dns_name_t local = DNS_NAME_INITABSOLUTE(local_ndata,
|
||||
local_offsets);
|
||||
|
||||
Reference in New Issue
Block a user