[Goodies-commits] r6467 - in xfce4-clipman-plugin/trunk: . panel-plugin

Mike Massonnet mmassonnet at xfce.org
Thu Jan 15 18:51:07 CET 2009


Author: mmassonnet
Date: 2009-01-15 17:51:07 +0000 (Thu, 15 Jan 2009)
New Revision: 6467

Modified:
   xfce4-clipman-plugin/trunk/ChangeLog
   xfce4-clipman-plugin/trunk/panel-plugin/clipman.c
Log:
	- Fix a free corruption by allocating the correct size for the string array 
 

Modified: xfce4-clipman-plugin/trunk/ChangeLog
===================================================================
--- xfce4-clipman-plugin/trunk/ChangeLog	2009-01-15 17:50:14 UTC (rev 6466)
+++ xfce4-clipman-plugin/trunk/ChangeLog	2009-01-15 17:51:07 UTC (rev 6467)
@@ -1,6 +1,7 @@
 2008-01-15	Mike Massonnet <mmassonnet at xfce.org>
 
 	- Fix a leak by freeing the ClipmanAction structs
+	- Fix a free corruption by allocating the correct size for the string array
 	- Don't show the tabs in the settings dialog and use the gtk-paste icon
 	- Backport from xfce-4-6 branch to save/load the history to/from cached
 	files living inside ~/.cache.

Modified: xfce4-clipman-plugin/trunk/panel-plugin/clipman.c
===================================================================
--- xfce4-clipman-plugin/trunk/panel-plugin/clipman.c	2009-01-15 17:50:14 UTC (rev 6466)
+++ xfce4-clipman-plugin/trunk/panel-plugin/clipman.c	2009-01-15 17:51:07 UTC (rev 6467)
@@ -665,6 +665,7 @@
           clipman_add_clip (clipman, ptext, PRIMARY, RAWTEXT);
           clipman_array_remove_oldest (clipman);
         }
+        //gtk_clipboard_set_text (defaultClip, ptext, -1);
         g_free (ptext);
         
       // If an image has been selected, don't process it - but reset PrimaryIndex
@@ -797,7 +798,7 @@
             return;
         }
 
-        texts = g_malloc0 (clipman->clips->len);
+        texts = g_malloc0 (clipman->clips->len * sizeof (gchar*));
         for (n_texts = i = 0; i < clipman->clips->len; i++)
         {
             clip = g_ptr_array_index (clipman->clips, i);




More information about the Goodies-commits mailing list