gnome-session r4597 - in branches/new-gnome-session: . egg



Author: lucasr
Date: Wed Mar  5 20:46:43 2008
New Revision: 4597
URL: http://svn.gnome.org/viewvc/gnome-session?rev=4597&view=rev

Log:
2008-04-05  Lucas Rocha  <lucasr gnome org>

	* egg/eggdesktopfile.c (egg_desktop_file_launchv): add a NULL item to
	the environment vars array in order to avoid invalid memory access.


Modified:
   branches/new-gnome-session/ChangeLog
   branches/new-gnome-session/egg/eggdesktopfile.c

Modified: branches/new-gnome-session/egg/eggdesktopfile.c
==============================================================================
--- branches/new-gnome-session/egg/eggdesktopfile.c	(original)
+++ branches/new-gnome-session/egg/eggdesktopfile.c	Wed Mar  5 20:46:43 2008
@@ -1180,6 +1180,12 @@
       startup_id = NULL;
 #endif /* HAVE_GDK_X11_DISPLAY_BROADCAST_STARTUP_MESSAGE */
 
+      if (env != NULL)
+        {
+          /* Add NULL item in the end of array  */
+          g_ptr_array_set_size (env, env->len + 1);
+        }
+
       current_success =
 	g_spawn_async_with_pipes (directory,
 				  argv,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]