← Back to team overview

cairo-dock-team team mailing list archive

[Merge] lp:~cairo-dock-team/cairo-dock-plug-ins/ubuntu into lp:ubuntu/lucid/cairo-dock-plug-ins

 

Matthieu Baerts has proposed merging lp:~cairo-dock-team/cairo-dock-plug-ins/ubuntu into lp:ubuntu/lucid/cairo-dock-plug-ins.

Requested reviews:
  Cairo-Dock Team (cairo-dock-team)
Related bugs:
  #449422 Cairo-Dock resize problem
  https://bugs.launchpad.net/bugs/449422
  #455261 Cannot Modify / Add Custom Launchers
  https://bugs.launchpad.net/bugs/455261
  #489349 showDesktop Applet only seems to work every second time you click on it.
  https://bugs.launchpad.net/bugs/489349
  #523447 MusicPlayer applet crashes on tracks with russians symbols
  https://bugs.launchpad.net/bugs/523447
  #526742 The system monitor plugin and netspeed plugin inverts upside-down continuously
  https://bugs.launchpad.net/bugs/526742
  #568083 Please update Cairo-Dock to v2.1.3-10
  https://bugs.launchpad.net/bugs/568083
  #568258 [lucid] cannot start cairo-dock since last updates
  https://bugs.launchpad.net/bugs/568258
  #575178 music-player applet crashes on change songs automatically
  https://bugs.launchpad.net/bugs/575178
  #576647 Please update Cairo-Dock with the following patches
  https://bugs.launchpad.net/bugs/576647


We have found and corrected 4 critical bugs in the package Cairo-Dock-plug-ins.
Here is a short summary:

* LP: #575178 (MP: fixed a double-free on the "cover-dir" variable of the banshee backend)

* LP: #523447 (MP: fixed a memory buffer overflow when getting the cover if the artist or album has chinese/russian characters)

* CD Forum: Switcher : fixed a division by 0 in the case he number of desktop is null (can occur if the dock is launched before the WM)

* CD Forum: Mail : allow the dock to isolate the applet if it crashes

All these bugs are critical since they cause the application to crash, and they involve memory corruption or memory overflow.
The patches are basic and almost 1 line each time.

Thanks in advance!
-- 
https://code.launchpad.net/~cairo-dock-team/cairo-dock-plug-ins/ubuntu/+merge/24869
Your team Cairo-Dock Team is requested to review the proposed merge of lp:~cairo-dock-team/cairo-dock-plug-ins/ubuntu into lp:ubuntu/lucid/cairo-dock-plug-ins.
=== modified file 'debian/changelog'
--- debian/changelog	2010-04-22 12:05:35 +0000
+++ debian/changelog	2010-05-06 21:43:24 +0000
@@ -1,3 +1,16 @@
+cairo-dock-plug-ins (2.1.3-10-lucid-0ubuntu3) lucid; urgency=low
+
+  * New bug-fixed release (LP: #576647)
+  * LP: #575178 (MP: fixed a double-free on the "cover-dir" variable
+               of the banshee backend)
+  * LP: #523447 (MP: fixed a memory buffer overflow when getting the
+               cover if the artist or album has chinese/russian characters)
+  * CD Forum: Switcher : fixed a division by 0 in the case he number
+    of desktop is null (can occur if the dock is launched before the WM)
+  * CD Forum: Mail : allow the dock to isolate the applet if it crashes
+
+ -- Matthieu Baerts (matttbe) <matttbe@xxxxxxxxx>  Thu, 06 May 2010 23:17:20 +0200
+
 cairo-dock-plug-ins (2.1.3-10-lucid-0ubuntu2) lucid; urgency=low
 
   [ Matthieu Baerts (matttbe) ]

=== modified file 'mail/src/cd-mail-applet-etpan.c'
--- mail/src/cd-mail-applet-etpan.c	2010-02-14 00:51:22 +0000
+++ mail/src/cd-mail-applet-etpan.c	2010-05-06 21:43:24 +0000
@@ -264,6 +264,7 @@
 gboolean cd_mail_update_account_status( CDMailAccount *pUpdatedMailAccount )
 {
 	if( !pUpdatedMailAccount ) return TRUE;
+	CD_APPLET_ENTER;
 	CairoDockModuleInstance *myApplet = pUpdatedMailAccount->pAppletInstance;
 	CairoContainer *pContainer = CD_APPLET_MY_ICONS_LIST_CONTAINER;
 	Icon *pIcon = pUpdatedMailAccount->icon;
@@ -272,7 +273,7 @@
 		pIcon = myIcon;
 		pContainer = myContainer;
 	}
-	g_return_val_if_fail (pIcon != NULL, TRUE);
+	CD_APPLET_LEAVE_IF_FAIL (pIcon != NULL, TRUE);
 	
 	//\_______________________ On met a jour l'icone du compte.
 	cairo_t *pIconContext = cairo_create (pIcon->pIconBuffer);
@@ -313,7 +314,7 @@
 	cairo_dock_redraw_icon (pIcon, pContainer);
 	
 	pUpdatedMailAccount->bInitialized = TRUE;
-	return TRUE;
+	CD_APPLET_LEAVE (TRUE);
 }
 
 void cd_mail_mark_all_mails_as_read(CDMailAccount *pMailAccount)

=== modified file 'musicPlayer/src/applet-amazon.c'
--- musicPlayer/src/applet-amazon.c	2010-04-21 10:50:32 +0000
+++ musicPlayer/src/applet-amazon.c	2010-05-06 21:43:24 +0000
@@ -218,7 +218,7 @@
 	s = str;
 	/// la ligne suivane peut planter ...
 	cd_debug ("allocation of %d bytes...\n", lenght + 1);
-	t = g_new (gchar, lenght + 1); // Allocation à la bonne taille
+	t = g_new (gchar, 4*(lenght + 1)); // Allocation à la bonne taille
 	ret = t;
 	//encodage
 	do{

=== modified file 'musicPlayer/src/applet-banshee.c'
--- musicPlayer/src/applet-banshee.c	2010-04-21 10:50:32 +0000
+++ musicPlayer/src/applet-banshee.c	2010-05-06 21:43:24 +0000
@@ -558,9 +558,7 @@
 	pBanshee->configure = cd_banshee_configure;  // renseigne les proprietes DBus et se connecte au bus.
 	pBanshee->control = cd_banshee_control;
 	pBanshee->get_cover = NULL;
-	gchar *cCoverDirMedia = g_strdup_printf ("%s/.cache/media-art", g_getenv ("HOME"));
-	pBanshee->cCoverDir = g_file_test (cCoverDirMedia, G_FILE_TEST_EXISTS) ? cCoverDirMedia : g_strdup_printf ("%s/.cache/album-art", g_getenv ("HOME"));
-	g_free (cCoverDirMedia);
+	pBanshee->cCoverDir = g_strdup_printf ("%s/.cache/media-art", g_getenv ("HOME"));
 	
 	pBanshee->appclass = "banshee";  // pffff
 	pBanshee->launch = "banshee";

=== modified file 'switcher/src/applet-desktops.c'
--- switcher/src/applet-desktops.c	2010-02-14 00:51:22 +0000
+++ switcher/src/applet-desktops.c	2010-05-06 21:43:24 +0000
@@ -39,6 +39,7 @@
 
 static void _cd_switcher_get_best_agencement (int iNbViewports, int *iBestNbLines, int *iBestNbColumns)
 {
+	g_return_if_fail (iNbViewports != 0);
 	//g_print ("%s (%d)\n", __func__, iNbViewports);
 	double fZoomX, fZoomY;
 	int iNbLines, iNbDesktopByLine;
@@ -109,6 +110,7 @@
 
 void cd_switcher_compute_desktop_coordinates (int iNumDesktop, int iNumViewportX, int iNumViewportY, int *iNumLine, int *iNumColumn)
 {
+	g_return_if_fail (myData.switcher.iNbColumns != 0);
 	//cd_debug ("%s (%d;%d)", __func__, iNumViewportX, iNumViewportY);
 	if (g_iNbDesktops > 1)  // plusieurs bureaux simples (Metacity) ou etendus (Compiz avec 2 cubes).
 	{

=== modified file 'switcher/src/applet-draw.c'
--- switcher/src/applet-draw.c	2010-02-14 00:51:22 +0000
+++ switcher/src/applet-draw.c	2010-05-06 21:43:24 +0000
@@ -124,6 +124,7 @@
 }
 void cd_switcher_draw_main_icon_compact_mode (void)
 {
+	g_return_if_fail (myData.switcher.iNbColumns != 0 && myData.switcher.iNbLines != 0);
 	//cd_debug ("%s (%d;%d)", __func__, myData.switcher.iCurrentLine, myData.switcher.iCurrentColumn);
 	// On efface l'icone.
 	cairo_dock_erase_cairo_context (myDrawContext);

=== modified file 'switcher/src/applet-notifications.c'
--- switcher/src/applet-notifications.c	2010-02-14 00:51:22 +0000
+++ switcher/src/applet-notifications.c	2010-05-06 21:43:24 +0000
@@ -268,7 +268,12 @@
 static gboolean _cd_switcher_redraw_main_icon_idle (CairoDockModuleInstance *myApplet)
 {
 	CD_APPLET_ENTER;
-	cd_switcher_draw_main_icon ();
+	if (myData.switcher.iNbColumns == 0)
+	{
+		cd_switcher_compute_nb_lines_and_columns ();
+		cd_switcher_get_current_desktop ();
+	}
+ 	cd_switcher_draw_main_icon ();
 	myData.iSidRedrawMainIconIdle = 0;
 	CD_APPLET_LEAVE (FALSE);
 	//return FALSE;
@@ -458,7 +463,9 @@
 		glPushMatrix ();
 		if (myDesklet)
 			glTranslatef (-myDesklet->container.iWidth/2, -myDesklet->container.iHeight/2, -myDesklet->container.iHeight*(sqrt(3)/2));
-		glTranslatef (x, y, 0);
+			glTranslatef (x - ((myIcon->iTextWidth & 1) ? 0.5 : 0.),
+				y - ((myIcon->iTextHeight & 1) ? 0.5 : 0.),
+				0);
 		cairo_dock_draw_texture_with_alpha (myIcon->iLabelTexture, myIcon->iTextWidth, myIcon->iTextHeight, myData.fDesktopNameAlpha);
 		glPopMatrix ();
 	}