Re: g_get_any_init change
- From: Tim Janik <timj gtk org>
- To: gtk-devel-list redhat com
- cc: Owen Taylor <otaylor redhat com>
- Subject: Re: g_get_any_init change
- Date: Thu, 28 Jan 1999 21:35:13 +0100 (CET)
On 28 Jan 1999, Owen Taylor wrote:
>
> Havoc Pennington <hp@Mcs.Net> writes:
>
> > Can someone please do this or give me the OK? All my apps are segfaulting
> > on startup, I see 1.1.14 is in the ChangeLog, and it is a really trivial
> > change. Just s/bufsize = 1/bufsize = 2/ seems to be fine.
>
> Hmmm, I thought that had been resolved... I guess I
> wasn't paying enough attention and letting other
> people handle it.
>
> But, I really think we should have some idea of why
> this is happening before we start randomly changing
> numbers.
>
> In a recent post Michael Lausch said:
>
> =====
> the getpwuid_r() function in glibc-2.0.7-19 doens not honor the
> bufsize parameter and scribbles all over the memory.
>
> the following patch corrects this, although im a bit uncertain about
> ====
>
> He changed the bufsize from 1 to sizeof (struct passwd). I
> don't know if this is the correct interpretation.
>
> The 1.1.14 tarballs have already been made and are
> on the ftp site, so if this needs to be fixed, it will
> be 1.1.15.
i already replied on this topic a few days ago, basically
the buffer is used to provide enough space for the required
substrings of the passwd struct, so sizeof (struct passwd) is
actually not a reasonable value. aparently glibc seems to be
buggy in that it trips over the buffer limits if buffer size=1,
so we should actually use a default buffer size of say 128 bytes
and thatīs about it (we should release a 1.1.15 for that matter
since a lot of people seem to be hitting that specific bug).
>
> Owen
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]