Mi Mikael,

I've checked the patch. It looks OK, however, you've missed that the
size is checked at two different places in decoder.cpp (one for messages
with single-byte size, other one for messages with eight-byte size). The
check for the limit should happen at both places.

Martin

On 9/11/2010, "Mikael Helbo Kjær" <[email protected]> wrote:

>Hi
>
>I picked up on a suggestion in another list about the idea of adding maximum 
>message sizes as a parameter to zmq and I whipped up a quick patch that is a 
>First attempt at implementing this. 
>
>My idea for an solution was to add a check to the decoder_t object and adding 
>another socket option for it which was then propagated to the decoder. I 
>haven't done anything on the encoder with regards to handling maximum size yet 
>as I was unsure if that was even an interesting option. I wanted to be liberal 
>in what I could send and conservative in what I would receive. I wanted to 
>send to the list to see if people had opinion if it was a good idea or not 
>(both if it is needed or if it is done in the right place). 
>
>The patch was done against last night's master-branch.
>
>Regards,
>Mikael H. Kjaer
>
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to