Blame SOURCES/pidgin-2.10.7-CVE-2013-6478.patch

abdd45
diff -up pidgin-2.10.7/pidgin/gtkimhtml.c.CVE-2013-6477 pidgin-2.10.7/pidgin/gtkimhtml.c
abdd45
--- pidgin-2.10.7/pidgin/gtkimhtml.c.CVE-2013-6477	2013-02-11 04:16:53.000000000 -0500
abdd45
+++ pidgin-2.10.7/pidgin/gtkimhtml.c	2014-01-27 12:20:54.660113325 -0500
abdd45
@@ -514,7 +514,13 @@ gtk_imhtml_tip_paint (GtkIMHtml *imhtml)
abdd45
 
abdd45
 	g_return_val_if_fail(GTK_IS_IMHTML(imhtml), FALSE);
abdd45
 
abdd45
-	layout = gtk_widget_create_pango_layout(imhtml->tip_window, imhtml->tip);
abdd45
+	/* We set the text in a separate function call so we can specify a
abdd45
+	   max length.  This is important so the tooltip isn't too wide for
abdd45
+	   the screen, and also because some X library function exits the
abdd45
+	   process when it can't allocate enough memory for a super wide
abdd45
+	   tooltip. */
abdd45
+	layout = gtk_widget_create_pango_layout(imhtml->tip_window, NULL);
abdd45
+	pango_layout_set_text(layout, imhtml->tip, 200);
abdd45
 
abdd45
 	gtk_paint_flat_box (imhtml->tip_window->style, imhtml->tip_window->window,
abdd45
 						GTK_STATE_NORMAL, GTK_SHADOW_OUT, NULL, imhtml->tip_window,
abdd45
@@ -561,7 +567,15 @@ gtk_imhtml_tip (gpointer data)
abdd45
 							  G_CALLBACK (gtk_imhtml_tip_paint), imhtml);
abdd45
 
abdd45
 	gtk_widget_ensure_style (imhtml->tip_window);
abdd45
-	layout = gtk_widget_create_pango_layout(imhtml->tip_window, imhtml->tip);
abdd45
+
abdd45
+	/* We set the text in a separate function call so we can specify a
abdd45
+	   max length.  This is important so the tooltip isn't too wide for
abdd45
+	   the screen, and also because some X library function exits the
abdd45
+	   process when it can't allocate enough memory for a super wide
abdd45
+	   tooltip. */
abdd45
+	layout = gtk_widget_create_pango_layout(imhtml->tip_window, NULL);
abdd45
+	pango_layout_set_text(layout, imhtml->tip, 200);
abdd45
+
abdd45
 	font = pango_context_load_font(pango_layout_get_context(layout),
abdd45
 			      imhtml->tip_window->style->font_desc);
abdd45