Re: libbsd
Hi!
On Thu, 2009-04-02 at 09:25:42 +0000, Thorsten Glaser wrote:
> jief1.l dixit:
> > but getline store the allocated size in len, not the line length as it
> > should.
I've fixed this now in libbsd, and done a new release. Will be
preparing an updated package for Debian now.
> Your correction is correct, however, I believe I do have a *much*
> shorter, simpler and faster solution handy:
>
> http://cvs.mirbsd.de/contrib/code/mirmake/dist/contrib/fgetln.c
>
> The file is also attached to this eMail for convenience.
> I originally wrote it for FreeWRT Embedded GNU/Linux because
> all existing variants, even the GPL’d ones, were buggy.
Your version seems to leak the buffer every time it's getting called.
regards,
guillem
Reply to: