mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-02 07:36:17 +01:00
Ignore anomalous environment entries which are not of the form
2005-07-10 Matthias Clasen <mclasen@redhat.com> * glib/gutils.c (g_listenv): Ignore anomalous environment entries which are not of the form variable=value. (#309859, Morten Welinder)
This commit is contained in:
parent
3baeda095b
commit
35425ca9d6
@ -1,3 +1,9 @@
|
||||
2005-07-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/gutils.c (g_listenv): Ignore anomalous environment
|
||||
entries which are not of the form variable=value. (#309859,
|
||||
Morten Welinder)
|
||||
|
||||
2005-07-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* glib/giowin32.c: Totally rewritten socket channel
|
||||
|
@ -1,3 +1,9 @@
|
||||
2005-07-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/gutils.c (g_listenv): Ignore anomalous environment
|
||||
entries which are not of the form variable=value. (#309859,
|
||||
Morten Welinder)
|
||||
|
||||
2005-07-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* glib/giowin32.c: Totally rewritten socket channel
|
||||
|
@ -1,3 +1,9 @@
|
||||
2005-07-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/gutils.c (g_listenv): Ignore anomalous environment
|
||||
entries which are not of the form variable=value. (#309859,
|
||||
Morten Welinder)
|
||||
|
||||
2005-07-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* glib/giowin32.c: Totally rewritten socket channel
|
||||
|
@ -1,3 +1,9 @@
|
||||
2005-07-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/gutils.c (g_listenv): Ignore anomalous environment
|
||||
entries which are not of the form variable=value. (#309859,
|
||||
Morten Welinder)
|
||||
|
||||
2005-07-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* glib/giowin32.c: Totally rewritten socket channel
|
||||
|
@ -1341,18 +1341,20 @@ gchar **
|
||||
g_listenv (void)
|
||||
{
|
||||
gchar **result, *eq;
|
||||
gint len, i;
|
||||
gint len, i, j;
|
||||
|
||||
len = g_strv_length (environ);
|
||||
result = g_new0 (gchar *, len + 1);
|
||||
|
||||
j = 0;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
eq = strchr (environ[i], '=');
|
||||
result[i] = g_strndup (environ[i], eq - environ[i]);
|
||||
if (eq)
|
||||
result[j++] = g_strndup (environ[i], eq - environ[i]);
|
||||
}
|
||||
|
||||
result[len] = NULL;
|
||||
result[j] = NULL;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user