Author: gedmurphy
Date: Mon Sep 1 03:00:22 2008
New Revision: 35851
URL:
http://svn.reactos.org/svn/reactos?rev=35851&view=rev
Log:
Check for null pointers passed to inet_addr
See issue #3695 for more details.
Modified:
trunk/reactos/dll/win32/ws2_32/misc/ns.c
Modified: trunk/reactos/dll/win32/ws2_32/misc/ns.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/misc/ns.c…
==============================================================================
--- trunk/reactos/dll/win32/ws2_32/misc/ns.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ws2_32/misc/ns.c [iso-8859-1] Mon Sep 1 03:00:22 2008
@@ -1297,6 +1297,12 @@
ULONG u = 0;
p = (PCHAR)cp;
+
+ if (!p)
+ {
+ WSASetLastError(WSAEFAULT);
+ return INADDR_NONE;
+ }
if (strlen(p) == 0)
return INADDR_NONE;