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

Ben Schumacher ben at blahr.com
Tue, 30 Sep 2003 16:32:47 -0600 (MDT)


Chris Lightfoot 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);

Ah... I see... very clever. I saw a malloc with no apparent free, and
immediately began thinking memory leak, but this makes sense.

Cheers,

bs.