getsockopt ZMQ_RCVMORE requires sizeof(int) at least, with 1 byte it should be more than enough

Description

in socket_base.cpp, line 267:
if (option_ == ZMQ_RCVMORE) {
if (*optvallen_ < sizeof (int)) {
errno = EINVAL;
return -1;
}
((int) optval_) = rcvmore ? 1 : 0;
*optvallen_ = sizeof (int);
return 0;
}

It forces the optval to be sizeof(int) when a char would be enough. What is the reason of enforcing at least sizeof(int) ?

Environment

None

Status

Assignee

Unassigned

Reporter

Javier Vera

Labels

Components

Affects versions

4.0.1

Priority

Trivial