mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-27 12:31:03 +00:00
Fix off-by-one in iteration.
This commit is contained in:
1 parent
382e38f494
commit
6445c8ed73
1 file changed
+1
-1
+1
-1
@@ -58,7 +58,7 @@ static int extract_name_no_compression(unsigned char *rr, int maxlen, char *buf)
|
||||
while (rr < end && *rr != 0)
|
||||
{
|
||||
count = *rr++;
|
||||
while (count-- >= 0 && rr < end)
|
||||
while (count-- > 0 && rr < end)
|
||||
{
|
||||
*buf = *rr++;
|
||||
if (!isascii(*buf) || iscntrl(*buf) || *buf == '.')
|
||||
|
||||
Reference in new issue
Block a user