mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 02:42:58 +01:00
Issue 23. zmq_init() crashes on illegal numbers
This commit is contained in:
parent
64c58662b7
commit
f60d891b23
@ -230,7 +230,10 @@ size_t zmq_msg_size (zmq_msg_t *msg_)
|
|||||||
// Reflect this in the API/ABI.
|
// Reflect this in the API/ABI.
|
||||||
void *zmq_init (int /*app_threads_*/, int io_threads_, int /*flags_*/)
|
void *zmq_init (int /*app_threads_*/, int io_threads_, int /*flags_*/)
|
||||||
{
|
{
|
||||||
// There are no context flags defined at the moment, so flags_ is ignored.
|
if (io_threads_ < 0) {
|
||||||
|
errno = EINVAL;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined ZMQ_HAVE_OPENPGM
|
#if defined ZMQ_HAVE_OPENPGM
|
||||||
// Unfortunately, OpenPGM doesn't support refcounted init/shutdown, thus,
|
// Unfortunately, OpenPGM doesn't support refcounted init/shutdown, thus,
|
||||||
|
Loading…
Reference in New Issue
Block a user