mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-28 07:58:14 +08:00
Fixed issue #344
This commit is contained in:
parent
8a64d80fba
commit
860e1d24c0
@ -85,14 +85,11 @@ int zmq::xrep_t::xsetsockopt (int option_, const void *optval_,
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(sizeof(optvallen_) != sizeof(int)) {
|
||||
if (optvallen_ != sizeof (int) || *((int*) optval_) < 0) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
fail_unroutable = *((const int*) optval_);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user