[python-eyed3] Add patch to fix crashes on files with empty UserTextFrames. Drop buildroot & clean sections. No lon

Brian Pepple bpepple at fedoraproject.org
Fri Aug 5 20:22:18 UTC 2011


commit 822bf65f8b2f4ca1c5d4a3fe2d71e49712e8e2e9
Author: Brian Pepple <bpepple at fedoraproject.org>
Date:   Fri Aug 5 15:23:18 2011 -0500

    Add patch to fix crashes on files with empty UserTextFrames.
    Drop buildroot & clean sections. No longer needed.

 eyed3-fix-empty-usertextframes.patch |   14 ++++++++++++++
 python-eyed3.spec                    |   14 ++++++++------
 2 files changed, 22 insertions(+), 6 deletions(-)
---
diff --git a/eyed3-fix-empty-usertextframes.patch b/eyed3-fix-empty-usertextframes.patch
new file mode 100644
index 0000000..3482e5d
--- /dev/null
+++ b/eyed3-fix-empty-usertextframes.patch
@@ -0,0 +1,14 @@
+--- /usr/lib/python2.7/site-packages/eyeD3/frames.py	2009-02-01 22:54:52.000000000 -0500
++++ frames.py	2011-08-04 11:56:04.000000000 -0400
+@@ -2152,7 +2152,10 @@ class FrameSet(list):
+ 
+ def splitUnicode(data, encoding):
+     if encoding == LATIN1_ENCODING or encoding == UTF_8_ENCODING:
+-        return data.split("\x00", 1);
++        ret = data.split("\x00", 1);
++        if len(ret) != 2:
++            ret.append("")
++        return ret
+     elif encoding == UTF_16_ENCODING or encoding == UTF_16BE_ENCODING:
+         # Two null bytes split, but since each utf16 char is also two 
+         # bytes we need to ensure we found a proper boundary.
diff --git a/python-eyed3.spec b/python-eyed3.spec
index cf7af11..717306c 100644
--- a/python-eyed3.spec
+++ b/python-eyed3.spec
@@ -2,14 +2,14 @@
 
 Name:           python-eyed3
 Version:        0.6.17
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Python module for processing ID3 tags
 
 Group:          Development/Languages
 License:        GPLv2+
 URL:            http://eyed3.nicfit.net/
 Source0:        http://eyed3.nicfit.net/releases/eyeD3-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0:         eyed3-fix-empty-usertextframes.patch
 
 BuildArch:      noarch
 BuildRequires:  python-devel
@@ -23,12 +23,14 @@ provided. The formats supported are ID3 v1.0/v1.1 and v2.3/v2.4.
 
 %prep
 %setup -q -n eyeD3-%{version}
+%patch0 -p1 -b .emptytextframes
 
 
 %build
 %configure
 # Make isn't necessary.
 
+
 %install
 rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
@@ -39,10 +41,6 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/doc/eyeD3-%{version}/ChangeLog.gz
 rm -f $RPM_BUILD_ROOT%{_datadir}/doc/eyeD3-%{version}/README
 rm -f $RPM_BUILD_ROOT%{_datadir}/doc/eyeD3-%{version}/THANKS
 
- 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 
 %files
 %defattr(-,root,root,-)
@@ -53,6 +51,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Aug  5 2011 Brian Pepple <bpepple at fedoraproject.org> - 0.6.17-6
+- Add patch to fix crashes on files with empty UserTextFrames.
+- Drop buildroot & clean sections. No longer needed.
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.6.17-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list