summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Lucina <mato@kotelna.sk>2010-08-27 18:41:10 +0200
committerMartin Lucina <mato@kotelna.sk>2010-08-27 18:41:10 +0200
commit0b76f234a2c521194029c6708c394391dfc66ea7 (patch)
tree270b286f48893bf22beb9de93349934ec9157755
parent35cb1fade62a92fdccc9fa0d75a3b69115c56c35 (diff)
parent98dc11843e3234e3d70b50d4f650089e7cf99e63 (diff)
Merge branch 'master' of github.com:zeromq/zeromq2
-rw-r--r--src/zmq_decoder.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/zmq_decoder.cpp b/src/zmq_decoder.cpp
index 8e335c9..dcf8e76 100644
--- a/src/zmq_decoder.cpp
+++ b/src/zmq_decoder.cpp
@@ -56,6 +56,9 @@ bool zmq::zmq_decoder_t::one_byte_size_ready ()
// TODO: Handle over-sized message decently.
+ // There has to be at least one byte (the flags) in the message).
+ zmq_assert (*tmpbuf > 0);
+
// in_progress is initialised at this point so in theory we should
// close it before calling zmq_msg_init_size, however, it's a 0-byte
// message and thus we can treat it as uninitialised...
@@ -74,6 +77,10 @@ bool zmq::zmq_decoder_t::eight_byte_size_ready ()
// TODO: Handle over-sized message decently.
+ // There has to be at least one byte (the flags) in the message).
+ zmq_assert (size > 0);
+
+
// in_progress is initialised at this point so in theory we should
// close it before calling zmq_msg_init_size, however, it's a 0-byte
// message and thus we can treat it as uninitialised...