mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Tidy TXT record sanitising
This commit is contained in:
@@ -699,15 +699,17 @@ static unsigned char *do_doctor(unsigned char *p, int count, struct dns_header *
|
|||||||
unsigned char *p2 = p1;
|
unsigned char *p2 = p1;
|
||||||
/* make counted string zero-term and sanitise */
|
/* make counted string zero-term and sanitise */
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
if (isprint(*(p2+1)))
|
{
|
||||||
{
|
if (!isprint((int)*(p2+1)))
|
||||||
*p2 = *(p2+1);
|
break;
|
||||||
p2++;
|
|
||||||
}
|
*p2 = *(p2+1);
|
||||||
|
p2++;
|
||||||
|
}
|
||||||
*p2 = 0;
|
*p2 = 0;
|
||||||
my_syslog(LOG_INFO, "reply %s is %s", name, p1);
|
my_syslog(LOG_INFO, "reply %s is %s", name, p1);
|
||||||
/* restore */
|
/* restore */
|
||||||
memmove(p1 + 1, p1, len);
|
memmove(p1 + 1, p1, i);
|
||||||
*p1 = len;
|
*p1 = len;
|
||||||
p1 += len+1;
|
p1 += len+1;
|
||||||
}
|
}
|
||||||
|
|||||||
11
src/tftp.c
11
src/tftp.c
@@ -582,9 +582,14 @@ void check_tftp_listeners(fd_set *rset, time_t now)
|
|||||||
my_syslog(MS_TFTP | LOG_INFO, endcon ? _("failed sending %s to %s") : _("sent %s to %s"), daemon->namebuff, daemon->addrbuff);
|
my_syslog(MS_TFTP | LOG_INFO, endcon ? _("failed sending %s to %s") : _("sent %s to %s"), daemon->namebuff, daemon->addrbuff);
|
||||||
/* unlink */
|
/* unlink */
|
||||||
*up = tmp;
|
*up = tmp;
|
||||||
/* put on queue to be sent to script and deleted */
|
if (endcon)
|
||||||
transfer->next = daemon->tftp_done_trans;
|
free_transfer(transfer);
|
||||||
daemon->tftp_done_trans = transfer;
|
else
|
||||||
|
{
|
||||||
|
/* put on queue to be sent to script and deleted */
|
||||||
|
transfer->next = daemon->tftp_done_trans;
|
||||||
|
daemon->tftp_done_trans = transfer;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user