Bug 163101 - id3lib incorrectly writes UTF-16 strings
id3lib incorrectly writes UTF-16 strings
Product: Fedora
Classification: Fedora
Component: id3lib (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dams
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2005-07-12 17:34 EDT by Matt Dainty
Modified: 2017-07-01 00:34 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-07-16 07:12:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to correct writing of UTF-16 tag values (565 bytes, patch)
2005-07-12 17:37 EDT, Matt Dainty
no flags Details | Diff

  None (edit)
Description Matt Dainty 2005-07-12 17:34:56 EDT
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):

How reproducible:

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 17:37:36 EDT
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 07:12:02 EDT
Thanks. id3lib-3.8.3-12.fc4 will fix this.

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