[Bro] Small bug in TCP_Rewriter

Christian Kreibich christian at whoop.org
Tue Aug 23 11:20:41 PDT 2005


On Tue, 2005-08-23 at 11:01 -0700, Vern Paxson wrote:
> [catching up on some old threads - apologies for the delay]
> 
> > perhaps ..
> > 
> >          if(!next_packet->AppendData(data, left))
> >          {     ASSERT(0);  }
> 
> Thanks, that looks like the correct fix.  I've added this.
> 
> By the way, does anyone know whether ASSERT() is guaranteed to be equivalent
> to a statement, so that the {}'s above can be safely omitted?

Mhmm avoid the problem by saying

	int success = next_packet->AppendData(data, left);
	ASSERT(success);
?

Cheers,
Christian.
-- 
________________________________________________________________________
                                          http://www.cl.cam.ac.uk/~cpk25
                                                    http://www.whoop.org





More information about the Bro mailing list