mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fix off-by-one in iteration.
This commit is contained in:
committed by
Simon Kelley
parent
382e38f494
commit
6445c8ed73
@@ -58,7 +58,7 @@ static int extract_name_no_compression(unsigned char *rr, int maxlen, char *buf)
|
|||||||
while (rr < end && *rr != 0)
|
while (rr < end && *rr != 0)
|
||||||
{
|
{
|
||||||
count = *rr++;
|
count = *rr++;
|
||||||
while (count-- >= 0 && rr < end)
|
while (count-- > 0 && rr < end)
|
||||||
{
|
{
|
||||||
*buf = *rr++;
|
*buf = *rr++;
|
||||||
if (!isascii(*buf) || iscntrl(*buf) || *buf == '.')
|
if (!isascii(*buf) || iscntrl(*buf) || *buf == '.')
|
||||||
|
|||||||
Reference in New Issue
Block a user