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 [email protected]
