Fix for critical bug in glib-1.2.8 on Dec alpha OSF
- From: Rene Hogendoorn <hogend nlr nl>
- To: gtk-list gnome org
- Subject: Fix for critical bug in glib-1.2.8 on Dec alpha OSF
- Date: 30 May 2000 16:33:07 +0200
testglib crashes in all cases (glib 1.2.1 -> 1.2.8) on Dec alpha osf v4.0f
right after printing "cwd: ....". Also, gtk+ crashes during memory allocation
The problem is due to a broken getpwuid_r on Dec alpha osf v4.0f. It is called
with an initial buffer size of 64 in gutils.c function "static void g_get_any_init (void)"
Rather than returning an error and setting errno, the getpwuid_r happily writes
beyond the end of the allocated buffer. This causes a crash lateron, when new memory
The man page for getpwuid_r states that a minimal buffer size of 1024 is required.
So setting "guint bufsize = 1024;" resolves this problem.
R. A. Hogendoorn E-mail: email@example.com
Information and Communication Technology Division Tel. +31-527-24-8367
National Aerospace Laboratory, The Netherlands Fax. +31-527-24-8210
] [Thread Prev