mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-14 15:05:38 +02:00
zmq_sendmsg and zmq_recvmsg checks for NULL message object
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user