mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
Check for null pointers passed to inet_addr
See issue #3695 for more details. svn path=/trunk/; revision=35851
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user