[Win32] Fix corner case bug when environment variable value is exactly one

2005-03-23  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.c (g_getenv): [Win32] Fix corner case bug when
	environment variable value is exactly one character.
This commit is contained in:
Tor Lillqvist
2005-03-23 14:55:02 +00:00
committed by Tor Lillqvist
parent 06ba5a1e73
commit 55e383a1c3
5 changed files with 24 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2005-03-23 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (g_getenv): [Win32] Fix corner case bug when
environment variable value is exactly one character.
2005-03-20 Tor Lillqvist <tml@novell.com>
* glib/gspawn-win32.c (do_spawn_with_pipes): Close the process

View File

@@ -1,3 +1,8 @@
2005-03-23 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (g_getenv): [Win32] Fix corner case bug when
environment variable value is exactly one character.
2005-03-20 Tor Lillqvist <tml@novell.com>
* glib/gspawn-win32.c (do_spawn_with_pipes): Close the process

View File

@@ -1,3 +1,8 @@
2005-03-23 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (g_getenv): [Win32] Fix corner case bug when
environment variable value is exactly one character.
2005-03-20 Tor Lillqvist <tml@novell.com>
* glib/gspawn-win32.c (do_spawn_with_pipes): Close the process

View File

@@ -1,3 +1,8 @@
2005-03-23 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (g_getenv): [Win32] Fix corner case bug when
environment variable value is exactly one character.
2005-03-20 Tor Lillqvist <tml@novell.com>
* glib/gspawn-win32.c (do_spawn_with_pipes): Close the process

View File

@@ -931,6 +931,8 @@ g_getenv (const gchar *variable)
g_free (wname);
return NULL;
}
else if (len == 1)
len = 2;
wvalue = g_new (wchar_t, len);
@@ -982,6 +984,8 @@ g_getenv (const gchar *variable)
g_free (cpname);
return NULL;
}
else if (len == 1)
len = 2;
cpvalue = g_new (gchar, len);