mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-14 11:06:59 +01:00
zmq_sendmsg and zmq_recvmsg checks for NULL message object
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
parent
3fb5c11b03
commit
f9eb763293
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user