Check for null pointers passed to inet_addr

See issue #3695 for more details.

svn path=/trunk/; revision=35851
This commit is contained in:
Ged Murphy
2008-09-01 08:00:22 +00:00
parent bf514701b8
commit e504422cb3
+6
View File
@@ -1298,6 +1298,12 @@ inet_addr(IN CONST CHAR FAR* cp)
p = (PCHAR)cp;
if (!p)
{
WSASetLastError(WSAEFAULT);
return INADDR_NONE;
}
if (strlen(p) == 0)
return INADDR_NONE;