Commit 860e1d24 authored by Pieter Hintjens's avatar Pieter Hintjens

Fixed issue #344

parent 8a64d80f
......@@ -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;
}
......
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