Check for a null pointer in WS_setsockopt.
This commit is contained in:
parent
26fa3496e0
commit
cb98365c75
|
@ -2620,7 +2620,7 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
|
||||||
is null?? */
|
is null?? */
|
||||||
optval = (char*)&linger;
|
optval = (char*)&linger;
|
||||||
optlen = sizeof(struct linger);
|
optlen = sizeof(struct linger);
|
||||||
} else if (optlen < sizeof(int)){
|
} else if (optval && optlen < sizeof(int)){
|
||||||
woptval= *((INT16 *) optval);
|
woptval= *((INT16 *) optval);
|
||||||
optval= (char*) &woptval;
|
optval= (char*) &woptval;
|
||||||
optlen=sizeof(int);
|
optlen=sizeof(int);
|
||||||
|
|
Loading…
Reference in New Issue