From 4adb170bc299b0fe9b294c8125c82e52109f60d1 Mon Sep 17 00:00:00 2001 From: Dan Horák Date: Jul 09 2010 11:08:05 +0000 Subject: - rebuilt without the internal crash handler --- diff --git a/.cvsignore b/.cvsignore index 186d2f1..289758e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -wxGTK-2.8.10.tar.bz2 +wxGTK-2.8.11.tar.bz2 diff --git a/wxGTK-2.8.10-CVE-2009-2369.patch b/wxGTK-2.8.10-CVE-2009-2369.patch deleted file mode 100644 index 49a932c..0000000 --- a/wxGTK-2.8.10-CVE-2009-2369.patch +++ /dev/null @@ -1,75 +0,0 @@ -Index: src/common/imagpng.cpp -=================================================================== ---- src/common/imagpng.cpp (revision 60874) -+++ src/common/imagpng.cpp (revision 60875) -@@ -568,18 +568,16 @@ - if (!image->Ok()) - goto error; - -- lines = (unsigned char **)malloc( (size_t)(height * sizeof(unsigned char *)) ); -+ // initialize all line pointers to NULL to ensure that they can be safely -+ // free()d if an error occurs before all of them could be allocated -+ lines = (unsigned char **)calloc(height, sizeof(unsigned char *)); - if ( !lines ) - goto error; - - for (i = 0; i < height; i++) - { - if ((lines[i] = (unsigned char *)malloc( (size_t)(width * (sizeof(unsigned char) * 4)))) == NULL) -- { -- for ( unsigned int n = 0; n < i; n++ ) -- free( lines[n] ); - goto error; -- } - } - - png_read_image( png_ptr, lines ); -Index: src/common/imagtiff.cpp -=================================================================== ---- src/common/imagtiff.cpp (revision 60875) -+++ src/common/imagtiff.cpp (revision 60876) -@@ -261,7 +261,6 @@ - } - - uint32 w, h; -- uint32 npixels; - uint32 *raster; - - TIFFGetField( tif, TIFFTAG_IMAGEWIDTH, &w ); -@@ -275,10 +274,21 @@ - (samplesInfo[0] == EXTRASAMPLE_ASSOCALPHA || - samplesInfo[0] == EXTRASAMPLE_UNASSALPHA)); - -- npixels = w * h; -+ // guard against integer overflow during multiplication which could result -+ // in allocating a too small buffer and then overflowing it -+ const double bytesNeeded = w * h * sizeof(uint32); -+ if ( bytesNeeded >= 4294967295U /* UINT32_MAX */ ) -+ { -+ if ( verbose ) -+ wxLogError( _("TIFF: Image size is abnormally big.") ); - -- raster = (uint32*) _TIFFmalloc( npixels * sizeof(uint32) ); -+ TIFFClose(tif); - -+ return false; -+ } -+ -+ raster = (uint32*) _TIFFmalloc( bytesNeeded ); -+ - if (!raster) - { - if (verbose) -Index: src/common/imagtiff.cpp -=================================================================== ---- src/common/imagtiff.cpp (revision 60896) -+++ src/common/imagtiff.cpp (revision 60897) -@@ -276,7 +276,7 @@ - - // guard against integer overflow during multiplication which could result - // in allocating a too small buffer and then overflowing it -- const double bytesNeeded = w * h * sizeof(uint32); -+ const double bytesNeeded = (double)w * (double)h * sizeof(uint32); - if ( bytesNeeded >= 4294967295U /* UINT32_MAX */ ) - { - if ( verbose ) diff --git a/wxGTK-2.8.10-gsocket.patch b/wxGTK-2.8.10-gsocket.patch deleted file mode 100644 index 32fb6c7..0000000 --- a/wxGTK-2.8.10-gsocket.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: 2.8/src/gtk/gsockgtk.cpp -=================================================================== ---- 2.8/src/gtk/gsockgtk.cpp (revision 60599) -+++ 2.8/src/gtk/gsockgtk.cpp (working copy) -@@ -15,8 +15,13 @@ - #include - #include - -+// newer versions of glib define its own GSocket but we unfortunately use this -+// name in our own (semi-)public header and so can't change it -- rename glib -+// one instead -+#define GSocket GlibGSocket - #include - #include -+#undef GSocket - - #include "wx/gsocket.h" - #include "wx/unix/gsockunx.h" - diff --git a/wxGTK-2.8.10-htmltable.patch b/wxGTK-2.8.10-htmltable.patch deleted file mode 100644 index 15b4e78..0000000 --- a/wxGTK-2.8.10-htmltable.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: src/html/m_tables.cpp -=================================================================== ---- src/html/m_tables.cpp (revision 59686) -+++ src/html/m_tables.cpp (revision 59687) -@@ -684,6 +684,7 @@ - { - wxHtmlTableCell *oldt = m_Table; - -+ wxHtmlContainerCell *oldEnclosing = m_enclosingContainer; - m_enclosingContainer = c = m_WParser->OpenContainer(); - - m_Table = new wxHtmlTableCell(c, tag, m_WParser->GetPixelScale()); -@@ -722,6 +723,7 @@ - m_WParser->CloseContainer(); - - m_Table = oldt; -+ m_enclosingContainer = oldEnclosing; - - return true; // ParseInner() called - } diff --git a/wxGTK-2.8.10-menubar-height.patch b/wxGTK-2.8.10-menubar-height.patch deleted file mode 100644 index 4d56eaf..0000000 --- a/wxGTK-2.8.10-menubar-height.patch +++ /dev/null @@ -1,55 +0,0 @@ -Index: src/gtk/frame.cpp -=================================================================== ---- src/gtk/frame.cpp (revision 62486) -+++ src/gtk/frame.cpp (revision 62487) -@@ -78,6 +78,30 @@ - } - } - -+//----------------------------------------------------------------------------- -+// "size-request" from menubar -+//----------------------------------------------------------------------------- -+ -+extern "C" { -+static void menubar_size_request(GtkWidget* widget, GtkRequisition*, wxFrame* win) -+{ -+ g_signal_handlers_disconnect_by_func( -+ widget, (void*)menubar_size_request, win); -+ win->UpdateMenuBarSize(); -+} -+} -+ -+//----------------------------------------------------------------------------- -+// "style-set" from menubar -+//----------------------------------------------------------------------------- -+ -+extern "C" { -+static void menubar_style_set(GtkWidget* widget, GtkStyle*, wxFrame* win) -+{ -+ g_signal_connect(widget, "size-request", -+ G_CALLBACK(menubar_size_request), win); -+} -+} - #endif // wxUSE_MENUS_NATIVE - - #if wxUSE_TOOLBAR -@@ -571,6 +595,9 @@ - - if ( m_frameMenuBar ) - { -+ g_signal_handlers_disconnect_by_func( -+ m_frameMenuBar->m_widget, (void*)menubar_style_set, this); -+ - m_frameMenuBar->UnsetInvokingWindow( this ); - - if (m_frameMenuBar->GetWindowStyle() & wxMB_DOCKABLE) -@@ -621,6 +648,9 @@ - gtk_widget_show( m_frameMenuBar->m_widget ); - - UpdateMenuBarSize(); -+ -+ g_signal_connect(menuBar->m_widget, "style-set", -+ G_CALLBACK(menubar_style_set), this); - } - else - { diff --git a/wxGTK-2.8.10-wxTimer-fix.patch b/wxGTK-2.8.10-wxTimer-fix.patch deleted file mode 100644 index e7059ca..0000000 --- a/wxGTK-2.8.10-wxTimer-fix.patch +++ /dev/null @@ -1,39 +0,0 @@ -Index: src/gtk/app.cpp -=================================================================== ---- src/gtk/app.cpp (revision 62396) -+++ src/gtk/app.cpp (revision 62397) -@@ -149,9 +149,11 @@ - // One-shot emission hook for "event" signal, to install idle handler. - // This will be called when the "event" signal is issued on any GtkWidget object. - static gboolean --event_emission_hook(GSignalInvocationHint*, guint, const GValue*, gpointer) -+event_emission_hook(GSignalInvocationHint*, guint, const GValue*, gpointer data) - { - wxapp_install_idle_handler(); -+ bool* hook_installed = (bool*)data; -+ *hook_installed = false; - // remove hook - return false; - } -@@ -159,12 +161,17 @@ - // add emission hook for "event" signal, to re-install idle handler when needed - static inline void wxAddEmissionHook() - { -+ static bool hook_installed; - GType widgetType = GTK_TYPE_WIDGET; -- // if GtkWidget type is loaded -- if (g_type_class_peek(widgetType) != NULL) -+ // if hook not installed and GtkWidget type is loaded -+ if (!hook_installed && g_type_class_peek(widgetType)) - { -- guint sig_id = g_signal_lookup("event", widgetType); -- g_signal_add_emission_hook(sig_id, 0, event_emission_hook, NULL, NULL); -+ static guint sig_id; -+ if (sig_id == 0) -+ sig_id = g_signal_lookup("event", widgetType); -+ hook_installed = true; -+ g_signal_add_emission_hook( -+ sig_id, 0, event_emission_hook, &hook_installed, NULL); - } - } - diff --git a/wxGTK.spec b/wxGTK.spec index 11b5220..a8cac43 100644 --- a/wxGTK.spec +++ b/wxGTK.spec @@ -1,6 +1,6 @@ Name: wxGTK Version: 2.8.11 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK2 port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -114,7 +114,8 @@ CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" --enable-mediactrl \ --enable-display \ --enable-timer \ - --enable-compat24 + --enable-compat24 \ + --disable-catch_segvs make %{?_smp_mflags} make %{?_smp_mflags} -C contrib/src/stc @@ -217,6 +218,9 @@ popd %changelog +* Thu Jul 1 2010 Dan Horák - 2.8.11-2 +- rebuilt without the internal crash handler + * Thu Apr 15 2010 Dan Horák - 2.8.11-1 - updated to 2.8.11