Bug 163101

Summary: id3lib incorrectly writes UTF-16 strings
Product: [Fedora] Fedora Reporter: Matt Dainty <matt>
Component: id3libAssignee: Dams <anvil>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: extras-qa, ildar.mulyukov
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-16 11:12:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to correct writing of UTF-16 tag values none

Description Matt Dainty 2005-07-12 21:34:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
When writing Unicode ID3v2 strings in UTF-16 format, id3lib can potentially write them incorrectly due to a bug in src/io_helpers.cpp.

The arithmetic is performed on signed character values rather than unsigned so in the case of some characters, they get written wrong.

Version-Release number of selected component (if applicable):
id3lib-3.8.3-11.fc4

How reproducible:
Always

Steps to Reproduce:
1. Get MP3 track with ID3v2 tag containing UTF-16 encoded values, (Japanese works well), verify track appears okay in some music application.
2. Use id3tag to change some value, such as the track number.
3. Reload altered track in the same music application.
  

Actual Results:  UTF-16 encoded values have become garbage.

Expected Results:  Nothing, apart from the change made in step 2.

Additional info:

Comment 1 Matt Dainty 2005-07-12 21:37:36 UTC
Created attachment 116687 [details]
Patch to correct writing of UTF-16 tag values

This is a patch containing the fix as documented in the sourceforge URL and
seems to work here.

Comment 2 Michael Schwendt 2005-07-16 11:12:02 UTC
Thanks. id3lib-3.8.3-12.fc4 will fix this.