projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf51470
)
Check for null pointers passed to inet_addr
author
Ged Murphy
<gedmurphy@reactos.org>
Mon, 1 Sep 2008 08:00:22 +0000
(08:00 +0000)
committer
Ged Murphy
<gedmurphy@reactos.org>
Mon, 1 Sep 2008 08:00:22 +0000
(08:00 +0000)
See issue #3695 for more details.
svn path=/trunk/; revision=35851
reactos/dll/win32/ws2_32/misc/ns.c
patch
|
blob
|
history
diff --git
a/reactos/dll/win32/ws2_32/misc/ns.c
b/reactos/dll/win32/ws2_32/misc/ns.c
index
1db254d
..
b95b2af
100644
(file)
--- 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;