mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-02 15:46:17 +01:00
[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:
parent
4635159309
commit
6e51f47e13
@ -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-21 Matthias Clasen <mclasen@redhat.com>
|
2005-03-21 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/glib.symbols: Add g_try_malloc0
|
* glib/glib.symbols: Add g_try_malloc0
|
||||||
|
@ -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-21 Matthias Clasen <mclasen@redhat.com>
|
2005-03-21 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/glib.symbols: Add g_try_malloc0
|
* glib/glib.symbols: Add g_try_malloc0
|
||||||
|
@ -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-21 Matthias Clasen <mclasen@redhat.com>
|
2005-03-21 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/glib.symbols: Add g_try_malloc0
|
* glib/glib.symbols: Add g_try_malloc0
|
||||||
|
@ -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-21 Matthias Clasen <mclasen@redhat.com>
|
2005-03-21 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/glib.symbols: Add g_try_malloc0
|
* glib/glib.symbols: Add g_try_malloc0
|
||||||
|
@ -1009,6 +1009,8 @@ g_getenv (const gchar *variable)
|
|||||||
g_free (wname);
|
g_free (wname);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
else if (len == 1)
|
||||||
|
len = 2;
|
||||||
|
|
||||||
wvalue = g_new (wchar_t, len);
|
wvalue = g_new (wchar_t, len);
|
||||||
|
|
||||||
@ -1060,6 +1062,8 @@ g_getenv (const gchar *variable)
|
|||||||
g_free (cpname);
|
g_free (cpname);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
else if (len == 1)
|
||||||
|
len = 2;
|
||||||
|
|
||||||
cpvalue = g_new (gchar, len);
|
cpvalue = g_new (gchar, len);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user