Re: [gtk-list] Re: still a bug with getpwuid_r [was: Re: 1.1.14



On Tue, 2 Feb 1999, Kevin Cozens wrote:
> This seems to be an awful hack. Surely there must be a better way to
> determine the size of the buffer that is needed. I can picture g_malloc
> returning NULL when there isn't enough memory to allocate the buffer. The
> getpwuid_r() call assumes that the g_malloc() call succeeded. If it didn't
> it would seem to me that you have a big problem just waiting to happen.


Much code assumes that g_malloc does not return NULL, not just this
snippet.

Further, if your malloc is returning NULL, you have bigger problems than
glib not being able to determine your username and home directory.

	Jeff






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