Fix patch for python. Fixes bug #677917

Add patch for unicode glyph crash. Fixes bug #631172
This commit is contained in:
Kevin Fenzi 2011-02-17 08:38:12 -07:00
parent 8c937f1de6
commit f63c0bd743
3 changed files with 27 additions and 9 deletions

View File

@ -1,12 +1,12 @@
diff -Nur fontforge-20100501.orig/fontforge/ffpython.h fontforge-20100501/fontforge/ffpython.h
--- fontforge-20100501.orig/fontforge/ffpython.h 2010-04-05 14:10:26.000000000 -0600
+++ fontforge-20100501/fontforge/ffpython.h 2010-07-28 12:07:25.000000000 -0600
@@ -25,7 +25,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+++ fontforge-20100501/fontforge/ffpython.h 2011-02-16 20:28:37.608104668 -0700
@@ -62,7 +62,7 @@
#define PyMODINIT_FUNC void
#endif
-#if PY_MAJOR_VERSION >= 3
+#if PY_MAJOR_VERSION >= 3 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6)
-#if PY_MAJOR_VERSION < 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 5)
+#if PY_MAJOR_VERSION < 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 7)
#define PyBytesObject PyStringObject
#define PyBytes_Type PyString_Type
#define PyInt_Check PyLong_Check
#define PyInt_AsLong PyLong_AsLong

View File

@ -0,0 +1,12 @@
diff -Nur fontforge-20100501/fontforge/fvcomposit.c fontforge-20100501.orig/fontforge/fvcomposit.c
--- fontforge-20100501/fontforge/fvcomposit.c 2011-02-16 20:33:29.632880857 -0700
+++ fontforge-20100501.orig/fontforge/fvcomposit.c 2010-04-05 14:10:26.000000000 -0600
@@ -1337,7 +1337,7 @@
unicodeenc==0x1fef || unicodeenc==0x1ffd || unicodeenc==0x1ffe))
return( false );
- if ( iszerowidth(unicodeenc) ||
+ if ((unicodeenc <= 0xffff && iszerowidth(unicodeenc)) ||
(unicodeenc>=0x2000 && unicodeenc<=0x2015 ))
return( !onlyaccents );

View File

@ -5,7 +5,7 @@
Name: fontforge
Version: 20100501
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Outline and bitmap font editor
Group: Applications/Publishing
@ -20,6 +20,7 @@ Patch1: fontforge-20090224-pythondl.patch
Patch2: fontforge-20100501-splinesets.patch
Patch3: fontforge-20100501-python27.patch
Patch4: fontforge-20100501-CVE-2010-4259.patch
Patch5: fontforge-20100501-unicode-crash.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: xdg-utils
@ -64,6 +65,7 @@ to compile applications against fontforge.
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
mkdir htdocs
tar xjf %{SOURCE2} -C htdocs
@ -154,6 +156,10 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_libdir}/pkgconfig/*.pc
%changelog
* Wed Feb 16 2011 Kevin Fenzi <kevin@tummy.com> - 20100501-7
- Fix patch for python. Fixes bug #677917
- Add patch for unicode glyph crash. Fixes bug #631172
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20100501-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild