Check for a null pointer in WS_setsockopt.

This commit is contained in:
Kester Maddock 2003-06-07 00:34:18 +00:00 committed by Alexandre Julliard
parent 26fa3496e0
commit cb98365c75
1 changed files with 1 additions and 1 deletions

View File

@ -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);