Fix potential heap corruption. Sometimes called g_free() on string
authorTor Lillqvist <tml@iki.fi>
Mon, 16 Dec 2002 05:22:08 +0000 (05:22 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Mon, 16 Dec 2002 05:22:08 +0000 (05:22 +0000)
2002-12-16  Tor Lillqvist  <tml@iki.fi>

* glib/gspawn-win32.c (do_spawn): Fix potential heap
corruption. Sometimes called g_free() on string literal.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gspawn-win32.c

index 23cb5fb..15aaa83 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * glib/gspawn-win32.c (do_spawn): Fix potential heap
+       corruption. Sometimes called g_free() on string literal.
+
 Sun Dec 15 19:51:58 2002  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: AC_SUBST() DATADIRNAME, not 
index 23cb5fb..15aaa83 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * glib/gspawn-win32.c (do_spawn): Fix potential heap
+       corruption. Sometimes called g_free() on string literal.
+
 Sun Dec 15 19:51:58 2002  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: AC_SUBST() DATADIRNAME, not 
index 23cb5fb..15aaa83 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * glib/gspawn-win32.c (do_spawn): Fix potential heap
+       corruption. Sometimes called g_free() on string literal.
+
 Sun Dec 15 19:51:58 2002  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: AC_SUBST() DATADIRNAME, not 
index 23cb5fb..15aaa83 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * glib/gspawn-win32.c (do_spawn): Fix potential heap
+       corruption. Sometimes called g_free() on string literal.
+
 Sun Dec 15 19:51:58 2002  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: AC_SUBST() DATADIRNAME, not 
index 23cb5fb..15aaa83 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * glib/gspawn-win32.c (do_spawn): Fix potential heap
+       corruption. Sometimes called g_free() on string literal.
+
 Sun Dec 15 19:51:58 2002  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: AC_SUBST() DATADIRNAME, not 
index 23cb5fb..15aaa83 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * glib/gspawn-win32.c (do_spawn): Fix potential heap
+       corruption. Sometimes called g_free() on string literal.
+
 Sun Dec 15 19:51:58 2002  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: AC_SUBST() DATADIRNAME, not 
index 23cb5fb..15aaa83 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-16  Tor Lillqvist  <tml@iki.fi>
+
+       * glib/gspawn-win32.c (do_spawn): Fix potential heap
+       corruption. Sometimes called g_free() on string literal.
+
 Sun Dec 15 19:51:58 2002  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: AC_SUBST() DATADIRNAME, not 
index ab6eb2d..fc5cb43 100644 (file)
@@ -606,9 +606,10 @@ do_spawn (gboolean              dont_wait,
     }
 
   if (working_directory && *working_directory)
+    /* The g_strdup() to lose the constness */
     new_argv[ARG_WORKING_DIRECTORY] = g_strdup (working_directory);
   else
-    new_argv[ARG_WORKING_DIRECTORY] = "-";
+    new_argv[ARG_WORKING_DIRECTORY] = g_strdup ("-");
 
   if (close_descriptors)
     new_argv[ARG_CLOSE_DESCRIPTORS] = "y";