Commit 03a2922d authored by Mihai Moldovan's avatar Mihai Moldovan

Revert "dix: integer overflow in GetHosts() [CVE-2014-8092 2/4]"

This reverts commit d4c76981.
parent 31322c2b
......@@ -1719,10 +1719,6 @@ GetHosts (
{
nHosts++;
n += (((host->len + 3) >> 2) << 2) + sizeof(xHostEntry);
/* Could check for INT_MAX, but in reality having more than 1mb of
hostnames in the access list is ridiculous */
if (n >= 1048576)
break;
}
if (n)
{
......@@ -1734,8 +1730,6 @@ GetHosts (
for (host = validhosts; host; host = host->next)
{
len = host->len;
if ((ptr + sizeof(xHostEntry) + len) > (data + n))
break;
((xHostEntry *)ptr)->family = host->family;
((xHostEntry *)ptr)->length = len;
ptr += sizeof(xHostEntry);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment