From 5ba1cb20fe6f6699cef1cc726718e760cd4c9af1 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 23 Jan 2012 08:53:25 +0100 Subject: Imported Upstream version 2.0.9.dfsg --- src/zmq_decoder.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/zmq_decoder.cpp') 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... -- cgit v1.2.3