diff --git a/reactos/dll/win32/ws2_32/misc/ns.c b/reactos/dll/win32/ws2_32/misc/ns.c index 1db254dee9b..b95b2af53ee 100644 --- a/reactos/dll/win32/ws2_32/misc/ns.c +++ b/reactos/dll/win32/ws2_32/misc/ns.c @@ -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;