+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
+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
+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
+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
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;
}