summaryrefslogtreecommitdiff
path: root/src/socket_base.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-12-16 07:04:38 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-12-16 07:04:38 +0100
commitf9eb763293014f812dac5558be5c5f03bb896efb (patch)
tree059ee8da70fbdc85d24bb7a2a4a72ead2f557a81 /src/socket_base.cpp
parent3fb5c11b03119a157db8dc024809943f88f87320 (diff)
zmq_sendmsg and zmq_recvmsg checks for NULL message object
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/socket_base.cpp')
-rw-r--r--src/socket_base.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index 302003f..7293419 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -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;
}