[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] Re: getline() differences FreeBSD / GNU libc
From: |
Christian Weisgerber |
Subject: |
[Bug-tar] Re: getline() differences FreeBSD / GNU libc |
Date: |
Thu, 21 Jan 2010 16:27:39 +0100 |
User-agent: |
Mutt/1.4.2.3i |
noordsij:
> Dear GNU tar maintainer(s) / fBSD gtar port maintainer(s),
> The problem appears to be a difference in getline() behaviour in the fBSD
> and GNU libc.
> So fBSD libc looks at the value of linecapp, whereas GNU libc looks at the
> value of lineptr, to determine whether to allocate a new buffer or use a
> provided one. In the tar source, linecapp (bufsize) is not initialized,
> lineptr (buf) is.
FWIW, getline() has been fixed in FreeBSD 9-CURRENT but the merge
back to 8.0 was forgotten.
> The fix is to simply initialize bufsize to 0 as well, to make (line
> 1232-1233):
>
> char *buf = 0;
> size_t bufsize = 0;
read_incr_db_01() should have the same fix.
--
Christian "naddy" Weisgerber address@hidden