2305. [security] inet_network() buffer overflow. CVE-2008-0122.

This commit is contained in:
Mark Andrews
2008-01-15 04:02:01 +00:00
parent 938b1008d9
commit fcdafc1e30
2 changed files with 4 additions and 2 deletions

View File

@@ -84,9 +84,9 @@ again:
}
if (!digit)
return (INADDR_NONE);
if (pp >= parts + 4 || val > 0xffU)
return (INADDR_NONE);
if (*cp == '.') {
if (pp >= parts + 4 || val > 0xffU)
return (INADDR_NONE);
*pp++ = val, cp++;
goto again;
}