Use longer buffer for user name.

2001-12-31  Tor Lillqvist  <tml@iki.fi>

	* glib/gutils.c (g_get_any_init): (Win32) Use longer buffer for
	user name.
This commit is contained in:
Tor Lillqvist 2001-12-31 10:12:22 +00:00 committed by Tor Lillqvist
parent a740df4158
commit bd82887a67
9 changed files with 44 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2001-12-31 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_get_any_init): (Win32) Use longer buffer for
user name.
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com> Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL * glib/gspawn.c (script_execute): Copy trailing NULL

View File

@ -1,3 +1,8 @@
2001-12-31 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_get_any_init): (Win32) Use longer buffer for
user name.
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com> Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL * glib/gspawn.c (script_execute): Copy trailing NULL

View File

@ -1,3 +1,8 @@
2001-12-31 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_get_any_init): (Win32) Use longer buffer for
user name.
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com> Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL * glib/gspawn.c (script_execute): Copy trailing NULL

View File

@ -1,3 +1,8 @@
2001-12-31 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_get_any_init): (Win32) Use longer buffer for
user name.
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com> Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL * glib/gspawn.c (script_execute): Copy trailing NULL

View File

@ -1,3 +1,8 @@
2001-12-31 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_get_any_init): (Win32) Use longer buffer for
user name.
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com> Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL * glib/gspawn.c (script_execute): Copy trailing NULL

View File

@ -1,3 +1,8 @@
2001-12-31 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_get_any_init): (Win32) Use longer buffer for
user name.
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com> Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL * glib/gspawn.c (script_execute): Copy trailing NULL

View File

@ -1,3 +1,8 @@
2001-12-31 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_get_any_init): (Win32) Use longer buffer for
user name.
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com> Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL * glib/gspawn.c (script_execute): Copy trailing NULL

View File

@ -1,3 +1,8 @@
2001-12-31 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_get_any_init): (Win32) Use longer buffer for
user name.
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com> Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL * glib/gspawn.c (script_execute): Copy trailing NULL

View File

@ -68,6 +68,7 @@
# define STRICT /* Strict typing, please */ # define STRICT /* Strict typing, please */
# include <windows.h> # include <windows.h>
# undef STRICT # undef STRICT
# include <lmcons.h> /* For UNLEN */
# include <ctype.h> # include <ctype.h>
#endif /* G_PLATFORM_WIN32 */ #endif /* G_PLATFORM_WIN32 */
@ -868,8 +869,8 @@ g_get_any_init (void)
# ifdef G_OS_WIN32 # ifdef G_OS_WIN32
{ {
guint len = 17; guint len = UNLEN+1;
gchar buffer[17]; gchar buffer[UNLEN+1];
if (GetUserName ((LPTSTR) buffer, (LPDWORD) &len)) if (GetUserName ((LPTSTR) buffer, (LPDWORD) &len))
{ {