Commit f9eb7632 authored by Martin Sustrik's avatar Martin Sustrik

zmq_sendmsg and zmq_recvmsg checks for NULL message object

Signed-off-by: 's avatarMartin Sustrik <sustrik@250bpm.com>
parent 3fb5c11b
......@@ -475,7 +475,7 @@ int zmq::socket_base_t::send (msg_t *msg_, int flags_)
}
// Check whether message passed to the function is valid.
if (unlikely (!msg_->check ())) {
if (unlikely (!msg_ || !msg_->check ())) {
errno = EFAULT;
return -1;
}
......@@ -541,7 +541,7 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_)
}
// Check whether message passed to the function is valid.
if (unlikely (!msg_->check ())) {
if (unlikely (!msg_ || !msg_->check ())) {
errno = EFAULT;
return -1;
}
......
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