Bug 728300 - [PATCH] eyeD3 crashes on files with empty UserTextFrames
Summary: [PATCH] eyeD3 crashes on files with empty UserTextFrames
Alias: None
Product: Fedora
Classification: Fedora
Component: python-eyed3
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Brian Pepple
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-04 16:00 UTC by Cole Robinson
Modified: 2011-08-17 00:54 UTC (History)
1 user (show)

Fixed In Version: python-eyed3-0.6.17-6.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-08-17 00:54:16 UTC

Attachments (Terms of Use)
Return expected output for empty unicode data (647 bytes, text/plain)
2011-08-04 16:00 UTC, Cole Robinson
no flags Details

Description Cole Robinson 2011-08-04 16:00:31 UTC
Created attachment 516742 [details]
Return expected output for empty unicode data

$ eyeD3 __TOADD/Utah_Jazz_-_One_And_Only_+_Midnight_Oil_-_One_And_Only.mp3 

Utah_Jazz_-_One_And_Only_+_Midnight_Oil_-_One_And_Only.mp3	[ 16.21 MB ]
Uncaught exception: need more than 1 value to unpack
Traceback (most recent call last):
  File "/usr/bin/eyeD3", line 1215, in <module>
    retval = main();
  File "/usr/bin/eyeD3", line 1192, in main
    retval = app.handleFile(f);
  File "/usr/bin/eyeD3", line 504, in handleFile
    TagDriverBase.handleFile(self, f)
  File "/usr/bin/eyeD3", line 377, in handleFile
    self.audioFile = eyeD3.tag.Mp3AudioFile(f, self.opts.tagVersion);
  File "/usr/lib/python2.7/site-packages/eyeD3/tag.py", line 1623, in __init__
    hasTag = self.tag.link(f, tagVersion);
  File "/usr/lib/python2.7/site-packages/eyeD3/tag.py", line 474, in link
    padding = self.__loadV2Tag(f);
  File "/usr/lib/python2.7/site-packages/eyeD3/tag.py", line 1355, in __loadV2Tag
    padding = self.frames.parse(fp, self.header, self.extendedHeader);
  File "/usr/lib/python2.7/site-packages/eyeD3/frames.py", line 1809, in parse
    self.addFrame(createFrame(frameHeader, data, tagHeader))
  File "/usr/lib/python2.7/site-packages/eyeD3/frames.py", line 2175, in createFrame
  File "/usr/lib/python2.7/site-packages/eyeD3/frames.py", line 904, in __init__
  File "/usr/lib/python2.7/site-packages/eyeD3/frames.py", line 714, in __init__
    self._set(data, frameHeader);
  File "/usr/lib/python2.7/site-packages/eyeD3/frames.py", line 925, in _set
    (d, t) = splitUnicode(data[1:], self.encoding);
ValueError: need more than 1 value to unpack

After the patch:

$ eyeD3 __TOADD/Utah_Jazz_-_One_And_Only_+_Midnight_Oil_-_One_And_Only.mp3 

Utah_Jazz_-_One_And_Only_+_Midnight_Oil_-_One_And_Only.mp3	[ 16.21 MB ]
Time: 07:04	MPEG1, Layer III	[ 320 kb/s @ 44100 Hz - Stereo ]
ID3 v2.3:
title: One And Only		artist: Utah Jazz
album: One And Only + Midnight Oil		year: None
track: 0		genre: Drum + Bass (id None)
Publisher/label: Liquid V
Unique File ID: [http://musicbrainz.org] 
Comment: [Description: ] [Lang: XXX]
Drum & Bass -

UserTextFrame: [Description: MusicBrainz Artist Id]

UserTextFrame: [Description: musicbrainz_artistid]

UserTextFrame: [Description: MusicBrainz Album Id]

UserTextFrame: [Description: musicbrainz_albumid]

UserTextFrame: [Description: MusicBrainz Album Artist Id]

UserTextFrame: [Description: musicbrainz_albumartistid]

GEOB: [Size: 3842 bytes] [Type: application/octet-stream]
Description: Serato Overview

GEOB: [Size: 19 bytes] [Type: application/octet-stream]
Description: Serato Autotags

GEOB: [Size: 318 bytes] [Type: application/octet-stream]
Description: Serato Markers_

GEOB: [Size: 32527 bytes] [Type: application/octet-stream]
Description: Serato Offsets_

The offending musicbrainz fields were added automatically by banshee I believe

This issue affects f14 through rawhide AFAICT

Comment 1 Brian Pepple 2011-08-04 17:59:14 UTC
I'm out of town right now, but when I get back home next week I'll look at applying this. Has you've submitted this upstream? Or do you want me to?

Comment 2 Fedora Update System 2011-08-06 17:44:07 UTC
python-eyed3-0.6.17-6.fc15 has been submitted as an update for Fedora 15.

Comment 3 Cole Robinson 2011-08-08 18:24:32 UTC
Thanks for the quick turnaround.

I'd appreciate if you could forward the patch upstream, thanks!

Comment 4 Fedora Update System 2011-08-09 01:25:59 UTC
Package python-eyed3-0.6.17-6.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-eyed3-0.6.17-6.fc15'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-08-17 00:54:11 UTC
python-eyed3-0.6.17-6.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.