Notification time stamped 2022-11-29 16:50:59 UTC
From de73f56efcab4b2afab45cd0ce57d85b4cb6813d Mon Sep 17 00:00:00 2001
From: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Nov 29 2022 16:49:35 +0000
Subject: Patch a possible double-free bug
---
diff --git a/possible-double-free.patch b/possible-double-free.patch
new file mode 100644
index 0000000..09a5660
--- /dev/null
+++ b/possible-double-free.patch
@@ -0,0 +1,11 @@
+diff -Naur a/woff.c b/woff.c
+--- a/woff.c 2009-09-25 09:54:13.000000000 -0400
++++ b/woff.c 2022-11-29 10:09:15.091798523 -0500
+@@ -354,6 +354,7 @@
+ newHeader->privLen = 0;
+
+ free(tableOrder);
++ tableOrder = 0;
+
+ if ((status & eWOFF_warn_checksum_mismatch) != 0) {
+ /* The original font had checksum errors, so we now decode our WOFF data
diff --git a/woff.spec b/woff.spec
index c99c7a7..afb8777 100644
--- a/woff.spec
+++ b/woff.spec
@@ -18,6 +18,11 @@ Source0: %{original_url}/woff-code-latest.zip
Source1: sfnt2woff.1
Source2: woff2sfnt.1
+# It’s possible that tableOrder could be freed twice if a failure occurs. Set
+# the pointer null after freeing it to prevent this. There is no current
+# upstream to which this could be reported.
+Patch: possible-double-free.patch
+
BuildRequires: make
BuildRequires: gcc
@@ -27,7 +32,7 @@ BuildRequires: zlib-devel
Encoding and Decoding for Web Open Font Format(Woff)
%prep
-%autosetup -c
+%autosetup -c -p1
%build
https://src.fedoraproject.org/rpms/woff/c/de73f56efcab4b2afab45cd0ce57d85b4…
Notification time stamped 2022-11-29 16:50:59 UTC
From 6471c2848cf455a06b43cfa3af7fba7b11307431 Mon Sep 17 00:00:00 2001
From: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Nov 29 2022 16:49:20 +0000
Subject: Clarify URL/Source situation
- Do not claim to have a working source archive URL
---
diff --git a/woff.spec b/woff.spec
index 724d4df..39d7f14 100644
--- a/woff.spec
+++ b/woff.spec
@@ -1,11 +1,20 @@
Name: woff
Version: 0.20091126
-Release: 25%{?dist}
+Release: 26%{?dist}
Summary: Encoding and Decoding for Web Open Font Format(Woff)
License: GPLv2+ or LGPLv2+ or MPLv1.1
-URL: https://web.archive.org/web/20170630235618/https://people-mozilla.org/~jkew…
-Source0: %{url}/woff-code-latest.zip
+# Note that the URL http://people.mozilla.org/~jkew/woff/, where the original
+# WOFF reference implementation sources were published, is no longer available.
+# A copy of that page can be found at
+# https://web.archive.org/web/20170630235618/https://people-mozilla.org/~jkew…,
+# and the sources are mirrored at https://github.com/TheJessieKirk/sfnt2woff.
+%global original_url https://people-mozilla.org/~jkew/woff/
+# The URL is no longer active, so we reference an archived copy:
+URL: https://web.archive.org/web/20170630235618/%{original_url}
+# There is no longer a working URL for this archive.
+Source0: %{original_url}/woff-code-latest.zip
+
BuildRequires: make
BuildRequires: zlib-devel
BuildRequires: gcc
@@ -30,6 +39,10 @@ install -m755 sfnt2woff woff2sfnt $RPM_BUILD_ROOT/%{_bindir}/
%{_bindir}/woff2sfnt
%changelog
+* Tue Nov 29 2022 Benjamin A. Beasley <code(a)musicinmybrain.net> - 0.20091126-26
+- Clarify URL/Source situation, and do not claim to have a working source
+ archive URL
+
* Sun Jun 05 2022 Benson Muite <benson_muite(a)emailplus.org> - 0.20091126-26
- Source URL update
https://src.fedoraproject.org/rpms/woff/c/6471c2848cf455a06b43cfa3af7fba7b1…
Notification time stamped 2022-11-29 16:50:59 UTC
From db1660bbcc695f3cbe31e0de86ecf0ac32deaeae Mon Sep 17 00:00:00 2001
From: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Nov 29 2022 16:49:50 +0000
Subject: Update License to SPDX
---
diff --git a/woff.spec b/woff.spec
index 186bdb6..0dfdef5 100644
--- a/woff.spec
+++ b/woff.spec
@@ -3,7 +3,7 @@ Version: 0.20091126
Release: %autorelease
Summary: Encoding and Decoding for Web Open Font Format(Woff)
-License: GPLv2+ or LGPLv2+ or MPLv1.1
+License: MPL-1.0 OR GPL-2.0-or-later OR LGPL-2.0-or-later
# Note that the URL http://people.mozilla.org/~jkew/woff/, where the original
# WOFF reference implementation sources were published, is no longer available.
# A copy of that page can be found at
https://src.fedoraproject.org/rpms/woff/c/db1660bbcc695f3cbe31e0de86ecf0ac3…
Notification time stamped 2022-11-29 16:50:59 UTC
From d88e4c62b146ac2a3ec2f50429bdf5004196c47c Mon Sep 17 00:00:00 2001
From: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Nov 29 2022 16:49:30 +0000
Subject: General tidying of spec file
- Use modern macros
- Install HTML format description as documentation
---
diff --git a/woff.spec b/woff.spec
index 39d7f14..b8a94a7 100644
--- a/woff.spec
+++ b/woff.spec
@@ -15,33 +15,41 @@ URL: https://web.archive.org/web/20170630235618/%{original_url}
# There is no longer a working URL for this archive.
Source0: %{original_url}/woff-code-latest.zip
-BuildRequires: make
-BuildRequires: zlib-devel
+BuildRequires: make
BuildRequires: gcc
+BuildRequires: zlib-devel
+
%description
Encoding and Decoding for Web Open Font Format(Woff)
%prep
-%autosetup -c
+%autosetup -c
+
%build
-make CFLAGS="${RPM_OPT_FLAGS}" %{?_smp_mflags}
+%set_build_flags
+%make_build CFLAGS="${CFLAGS}"
%install
-mkdir -m 755 -p $RPM_BUILD_ROOT/%{_bindir}
-install -m755 sfnt2woff woff2sfnt $RPM_BUILD_ROOT/%{_bindir}/
+# The Makefile has no install target.
+install -d '%{buildroot}%{_bindir}'
+install -t '%{buildroot}%{_bindir}' -p sfnt2woff woff2sfnt
+
%files
-%doc
+%doc woff-2009-10-03.html
%{_bindir}/sfnt2woff
%{_bindir}/woff2sfnt
+
%changelog
* Tue Nov 29 2022 Benjamin A. Beasley <code(a)musicinmybrain.net> - 0.20091126-26
- Clarify URL/Source situation, and do not claim to have a working source
archive URL
+- General tidying of spec file; use modern macros and install HTML format
+ description as documentation
* Sun Jun 05 2022 Benson Muite <benson_muite(a)emailplus.org> - 0.20091126-26
- Source URL update
https://src.fedoraproject.org/rpms/woff/c/d88e4c62b146ac2a3ec2f50429bdf5004…
Notification time stamped 2022-11-29 16:50:59 UTC
From c53a2a2ae25bc585c03ef749e653694a2d454bd6 Mon Sep 17 00:00:00 2001
From: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Nov 29 2022 16:49:51 +0000
Subject: Improved summary and description
---
diff --git a/woff.spec b/woff.spec
index 0dfdef5..e213f93 100644
--- a/woff.spec
+++ b/woff.spec
@@ -1,7 +1,7 @@
Name: woff
Version: 0.20091126
Release: %autorelease
-Summary: Encoding and Decoding for Web Open Font Format(Woff)
+Summary: Encoding and decoding for Web Open Font Format (WOFF)
License: MPL-1.0 OR GPL-2.0-or-later OR LGPL-2.0-or-later
# Note that the URL http://people.mozilla.org/~jkew/woff/, where the original
@@ -29,7 +29,8 @@ BuildRequires: gcc
BuildRequires: zlib-devel
%description
-Encoding and Decoding for Web Open Font Format(Woff)
+Provides the sfnt2woff and woff2sfnt command-line tools for encoding and
+decoding Web Open Font Format (WOFF) files.
%prep
%autosetup -c -p1
https://src.fedoraproject.org/rpms/woff/c/c53a2a2ae25bc585c03ef749e653694a2…