summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-12-20 13:06:36 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-12-20 13:06:36 +0100
commit51d2d9b9f82526a9b471dda272c1d54b3d1b1152 (patch)
tree494c2f5e2377be81f6fc82dc98a7a7904ecdf039
parent112d0cd52ec959a6bb4cf02ab03977bc22478246 (diff)
Yet one more fix for oversized messages.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
-rw-r--r--src/decoder.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/decoder.cpp b/src/decoder.cpp
index 0b2a806..c8ca715 100644
--- a/src/decoder.cpp
+++ b/src/decoder.cpp
@@ -65,6 +65,8 @@ bool zmq::decoder_t::one_byte_size_ready ()
// message and thus we can treat it as uninitialised...
int rc = zmq_msg_init_size (&in_progress, *tmpbuf - 1);
if (rc != 0 && errno == ENOMEM) {
+ rc = zmq_msg_init (&in_progress);
+ errno_assert (rc == 0);
decoding_error ();
return false;
}