glib error




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
it. the sizeof() statement was there but commented out.....

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]