Re: [gtk-list] Re: Problems with GLib & Gdk




[i sent similar message to gtk-devel]

I found that with glibc-2.0.7-19  the bufsize parameter to the
getpwuid_r() function is not honoured. It just scribbles over
unallocated memory. Fortunatly all programs crashed on my machine and
efence gave the last hint.

the following patch works for me:

Index: gutils.c
===================================================================
RCS file: /cvs/gnome/glib/gutils.c,v
retrieving revision 1.35
diff -c -r1.35 gutils.c
*** gutils.c	1999/01/25 09:53:17	1.35
--- gutils.c	1999/01/26 12:58:29
***************
*** 443,449 ****
  
  #  ifdef HAVE_GETPWUID_R
          struct passwd pwd;
!         guint bufsize = 1; /* sizeof (struct passwd); */
          gint error;
  
          do
--- 443,449 ----
  
  #  ifdef HAVE_GETPWUID_R
          struct passwd pwd;
!         guint bufsize = sizeof (struct passwd);
          gint error;
  
          do



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]