This manifests in
size_t ID3_Field::Get(unicode_t *buffer, size_t len)
returning twice the number of characters. This bug may not have been discoverd yet as the string written to the buffer is correctly NULL terminated.
ID3_FieldImpl::Size() has the follow comment:
** The value returned is dependent on the type of the field. For ASCII
** strings, this returns the number of characters in the field, not including
** any NULL-terminator. The same holds true for Unicode---it returns the
** number of characters in the field, not bytes,
In ID3_FieldImpl all string values are stored in the dami::String _text, dami::String is a std::basic_string<char>, the same as std::string. ID3_FieldImpl::Size() returns _text.size() whether or not the string is Unicode. If the encoding _enc is Unicode the methods should half the number of chars (8 bits) to give the number of unicode_t (16 bits).
The 3.8.3 package and both CVS modles have this bug, the stable CVS module has the following comment in ID3_FieldImpl::BinSize():
size *= 2; // FIXME: I guess this is wrong
where the Unicode ID3_FieldImpl::Size() value, stored in 'size', is doubled to give the size in bytes. BinSize() is correct, Size() is wrong so the comment should be removed. It makes sense that BinSize() return s the size in bytes and Size() returns the size in characters.
Patch against 3.8.3 package src/field.cpp