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_, ...@@ -85,14 +85,11 @@ int zmq::xrep_t::xsetsockopt (int option_, const void *optval_,
errno = EINVAL; errno = EINVAL;
return -1; return -1;
} }
if (optvallen_ != sizeof (int) || *((int*) optval_) < 0) {
if(sizeof(optvallen_) != sizeof(int)) {
errno = EINVAL; errno = EINVAL;
return -1; return -1;
} }
fail_unroutable = *((const int*) optval_); fail_unroutable = *((const int*) optval_);
return 0; 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