Commit cb98365c authored by Kester Maddock's avatar Kester Maddock Committed by Alexandre Julliard

Check for a null pointer in WS_setsockopt.

parent 26fa3496
......@@ -2620,7 +2620,7 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
is null?? */
optval = (char*)&linger;
optlen = sizeof(struct linger);
} else if (optlen < sizeof(int)){
} else if (optval && optlen < sizeof(int)){
woptval= *((INT16 *) optval);
optval= (char*) &woptval;
optlen=sizeof(int);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment