[tpop3d-discuss] tpop3d and incompetently-written virus scanners (was: Re: Tpop3d Bug?)

Chris Lightfoot chris at ex-parrot.com
Tue, 30 Sep 2003 22:44:09 +0100


On Tue, Sep 30, 2003 at 02:45:50PM -0600, Ben Schumacher wrote:
> Chris-
> 
> Quick question... I was trying to track this through the code, but since
> you now malloc here, where does this memory get freed? As far as I can
> tell, it doesn't... but I thought I'd run it by you and see what you said.

You're quite right. That should be realloc. The idea is
that the buffer grows to the length of the longest
response line ever transmitted by the server.

> > +        buf = xmalloc(buflen = l + 1);

should be,
            buf = xrealloc(buf, buflen = l + 1);

-- 
``A lie can be half-way around the world before truth has got his boots on.''
  (James Callaghan)