Compare commits

...

9 Commits
master ... f10

Author SHA1 Message Date
Fedora Release Engineering e11756cd3c dist-git conversion 2010-07-29 15:28:27 +00:00
Bill Nottingham d924ba2d53 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:19:34 +00:00
Dan Horák 36db7a4618 - added fix for html tables rendering (#534030)
- removed the long time disabled odbc subpackage
2009-11-10 13:20:27 +00:00
Dan Horák 5710ce65bf - add fix for wrong menubar height when using larger system font (#528376) 2009-10-25 09:48:52 +00:00
Dan Horák 5c5b93105d - add fix for excessive CPU usage (#494425) 2009-10-16 10:20:36 +00:00
Dan Horák fe46b2ca9b - fix default plugin path for 64 bit arches 2009-08-14 14:30:54 +00:00
Dan Horák 63a68f4974 - add fix for CVE-2009-2369 (#511279) 2009-07-15 17:55:06 +00:00
Dan Horák 118156ad98 - update to 2.8.10 2009-05-22 11:28:57 +00:00
Jesse Keating 451a9b0353 Initialize branch F-10 for wxGTK 2008-11-07 04:39:51 +00:00
9 changed files with 231 additions and 59 deletions

View File

@ -1 +0,0 @@
wxGTK-2.8.9.tar.bz2

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
wxGTK-2.8.10.tar.bz2

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: wxGTK
# $Id$
NAME := wxGTK
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -1 +1 @@
495c0287e102c8864eb5237a279ce9c2 wxGTK-2.8.9.tar.bz2
88b867bc118a183af56efc67014bdf27 wxGTK-2.8.10.tar.bz2

View File

@ -0,0 +1,75 @@
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 )

View File

@ -0,0 +1,20 @@
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
}

View File

@ -0,0 +1,55 @@
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
{

View File

@ -0,0 +1,39 @@
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);
}
}

View File

@ -1,21 +1,23 @@
%define x11libdir %{_prefix}/X11R6/%{_lib}
# Option - build an ODBC subpackage using unixODBC. (This is currently
# broken; see <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176950>.)
%define withodbc 0
Name: wxGTK
Version: 2.8.9
Release: 1%{?dist}
Version: 2.8.10
Release: 5%{?dist}
Summary: GTK2 port of the wxWidgets GUI library
# The wxWindows licence is the LGPL with a specific exemption allowing
# distribution of derived binaries under any terms. (This will eventually
# change to be "wxWidgets License" once that is approved by OSI.)
License: wxWidgets
Group: System Environment/Libraries
URL: http://www.wxwidgets.org/
Source0: http://dl.sf.net/wxwindows/%{name}-%{version}.tar.bz2
# http://trac.wxwidgets.org/ticket/10993
Patch0: %{name}-2.8.10-CVE-2009-2369.patch
# http://trac.wxwidgets.org/ticket/11315
Patch1: %{name}-2.8.10-wxTimer-fix.patch
# http://trac.wxwidgets.org/ticket/11310
Patch2: %{name}-2.8.10-menubar-height.patch
# http://trac.wxwidgets.org/ticket/10370 (#534030)
Patch3: %{name}-2.8.10-htmltable.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gtk2-devel, zlib-devel >= 1.1.4
@ -26,8 +28,8 @@ BuildRequires: libSM-devel
BuildRequires: gstreamer-devel >= 0.10, gstreamer-plugins-base-devel >= 0.10
BuildRequires: GConf2-devel
BuildRequires: autoconf, gettext
%if %{withodbc}
BuildRequires: unixODBC-devel
%if 0%{?fedora} < 11
BuildRequires: dbus-devel
%endif
# all of these are for previous Fedora Extras sub-packages
@ -96,17 +98,6 @@ Obsoletes: compat-wxGTK-gl < %{version}-%{release}
OpenGL (a 3D graphics API) add-on for the wxWidgets library.
%if %{withodbc}
%package odbc
Summary: ODBC add-on for the wxWidgets library
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
%description odbc
ODBC (a SQL database connectivity API) add-on for the wxWidgets library.
%endif
%package -n wxBase
Summary: Non-GUI support classes from the wxWidgets library
Group: System Environment/Libraries
@ -121,9 +112,16 @@ libraries or the X Window System.
%prep
%setup -q
%patch0 -p0 -b .CVE-2009-2369
%patch1 -p0 -b .wxTimer-fix
%patch2 -p0 -b .menubar-height
%patch3 -p0 -b .htmltable
sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure
# fix plugin dir for 64-bit
sed -i -e 's|/lib|/%{_lib}|' src/unix/stdpaths.cpp
%build
@ -142,9 +140,6 @@ CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure \
--x-libraries=%{x11libdir} \
--with-opengl \
%if %{withodbc}
--with-odbc \
%endif
--with-sdl \
--with-gnomeprint \
--enable-shared \
@ -202,11 +197,6 @@ rm -rf $RPM_BUILD_ROOT
%post gl -p /sbin/ldconfig
%postun gl -p /sbin/ldconfig
%if %{withodbc}
%post odbc -p /sbin/ldconfig
%postun odbc -p /sbin/ldconfig
%endif
%post -n wxBase -p /sbin/ldconfig
%postun -n wxBase -p /sbin/ldconfig
@ -247,13 +237,8 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{_libdir}/libwx_gtk2u_gl-*.so.*
%if %{withodbc}
%files odbc
%defattr(-,root,root,-)
%{_libdir}/libwx_gtk2u_odbc-*.so.*
%endif
%files -n wxBase
%defattr(-,root,root,-)
%doc docs/changes.txt docs/gpl.txt docs/lgpl.txt docs/licence.txt
%doc docs/licendoc.txt docs/preamble.txt docs/readme.txt
%{_libdir}/libwx_baseu-*.so.*
@ -262,6 +247,25 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Tue Nov 10 2009 Dan Horák <dan[at]danny.cz> - 2.8.10-5
- added fix for html tables rendering (#534030)
- removed the long time disabled odbc subpackage
* Sun Oct 25 2009 Dan Horák <dan[at]danny.cz> - 2.8.10-4
- add fix for wrong menubar height when using larger system font (#528376)
* Fri Oct 16 2009 Dan Horák <dan[at]danny.cz> - 2.8.10-3
- add fix for excessive CPU usage (#494425)
* Fri Aug 14 2009 Dan Horák <dan[at]danny.cz> - 2.8.10-2.1
- fix default plugin path for 64 bit arches
* Wed Jul 15 2009 Dan Horák <dan[at]danny.cz> - 2.8.10-2
- add fix for CVE-2009-2369 (#511279)
* Fri May 22 2009 Dan Horak <dan[at]danny.cz> - 2.8.10-1
- update to 2.8.10
* Mon Sep 22 2008 Dan Horak <dan[at]danny.cz> - 2.8.9-1
- update to 2.8.9