Package: eyed3
Version: 0.6.17-2
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu precise ubuntu-patch

In Ubuntu, the attached patch was applied to prevent a crash upon handling an 
empty BPM tag.

Ubuntu bug here: https://bugs.launchpad.net/ubuntu/+source/eyed3/+bug/608663

This patch also converts to format 3.0 (quilt) so it can add a source patch

Thanks for considering the patch.


-- System Information:
Debian Release: wheezy/sid
  APT prefers oneiric-updates
  APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 
'oneiric')
Architecture: i386 (i686)

Kernel: Linux 3.0.0-12-generic (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru eyed3-0.6.17/debian/patches/01_handle_empty_BPM_tag.patch eyed3-0.6.17/debian/patches/01_handle_empty_BPM_tag.patch
--- eyed3-0.6.17/debian/patches/01_handle_empty_BPM_tag.patch	1969-12-31 19:00:00.000000000 -0500
+++ eyed3-0.6.17/debian/patches/01_handle_empty_BPM_tag.patch	2011-10-21 15:15:49.000000000 -0400
@@ -0,0 +1,21 @@
+Description: Handle empty BPM tag that would normally cause an exception.
+Forwarded: Yes
+Author: Dave Holland
+Origin: Dave Holland, https://bugs.launchpad.net/ubuntu/+source/eyed3/+bug/608663/+attachment/1463917/+files/eyed3.patch
+Reviewed-By: Daniel T Chen <[email protected]>
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/eyed3/+bug/608663
+Last-Update: 2011-07-30
+
+Index: eyed3-0.6.17-2ubuntu1/src/eyeD3/tag.py
+===================================================================
+--- eyed3-0.6.17-2ubuntu1.orig/src/eyeD3/tag.py	2011-08-27 06:34:06.000000000 -0400
++++ eyed3-0.6.17-2ubuntu1/src/eyeD3/tag.py	2011-10-21 15:15:46.104430918 -0400
+@@ -983,6 +983,8 @@
+       bpm = self.frames[BPM_FID];
+       if bpm:
+           # Round floats since the spec says this is an integer
++          if(bpm[0].text == ''):
++            return None;
+           bpm = int(float(bpm[0].text) + 0.5)
+           return bpm
+       else:
diff -Nru eyed3-0.6.17/debian/patches/series eyed3-0.6.17/debian/patches/series
--- eyed3-0.6.17/debian/patches/series	1969-12-31 19:00:00.000000000 -0500
+++ eyed3-0.6.17/debian/patches/series	2011-10-21 15:15:38.000000000 -0400
@@ -0,0 +1 @@
+01_handle_empty_BPM_tag.patch
diff -Nru eyed3-0.6.17/debian/source/format eyed3-0.6.17/debian/source/format
--- eyed3-0.6.17/debian/source/format	1969-12-31 19:00:00.000000000 -0500
+++ eyed3-0.6.17/debian/source/format	2011-10-21 15:15:00.000000000 -0400
@@ -0,0 +1 @@
+3.0 (quilt)

Reply via email to