>  Tue Apr 21 2009  2:34:57 am EDT from dothebart <> Subject: Re: Citadel
>commit log: revision 7384
>
>    
>
>there are two possible causes:  
>
>* StrBufReadBLOBBuffered() is fed by the wrong size to read by wrong
>calculation  
>
>* StrBufReadBLOBBuffered() is trying to continue to read, while the other
>party is gone  
>
>* StrBufReadBLOBBuffered() is fed by the wrong size to read because of for
>example a 'contentlength' header lied to us  
>
>could you please check which one this is?  
>
>The blob reader most probably needs to get some abort code and a switch
>telling it to check for '\n000' at the end of the read buffer so it can
>detect the 3rd case.. and some more code not to choke on the first two.  
>
>
>
>  

  

I'm hoping that we move to checking for \n000 as an atomic read when reading
from the socket, and that we don't ever check for it in a static buffer.  

We can do time-based escaping by detecting any \n000 that may occur naturally
in a message and performing it as two writes, perhaps \n0 and 00  

Thus \n000 is only magical when it is the sole and entire buffer read for one
of the reads in the read loop.  

000 can occur in messages either naturally or as mischeif and we need to take
steps to stop it being problematic, or even to get rid of it entirely.

Reply via email to