1 diff --git a/compat.gperf b/compat.gperf
2 index 4e24613..5635980 100644
5 @@ -236,6 +236,10 @@ int id3_compat_fixup(struct id3_tag *tag)
7 encoding = id3_parse_uint(&data, 1);
8 string = id3_parse_string(&data, end - data, encoding, 0);
14 if (id3_ucs4_length(string) < 4) {
16 diff --git a/genre.dat b/genre.dat
17 index 17acab5..1f02779 100644
20 @@ -277,8 +277,8 @@ static id3_ucs4_t const genre_PUNK_ROCK[] =
21 { 'P', 'u', 'n', 'k', ' ', 'R', 'o', 'c', 'k', 0 };
22 static id3_ucs4_t const genre_DRUM_SOLO[] =
23 { 'D', 'r', 'u', 'm', ' ', 'S', 'o', 'l', 'o', 0 };
24 -static id3_ucs4_t const genre_A_CAPPELLA[] =
25 - { 'A', ' ', 'C', 'a', 'p', 'p', 'e', 'l', 'l', 'a', 0 };
26 +static id3_ucs4_t const genre_A_CAPELLA[] =
27 + { 'A', ' ', 'C', 'a', 'p', 'e', 'l', 'l', 'a', 0 };
28 static id3_ucs4_t const genre_EURO_HOUSE[] =
29 { 'E', 'u', 'r', 'o', '-', 'H', 'o', 'u', 's', 'e', 0 };
30 static id3_ucs4_t const genre_DANCE_HALL[] =
31 @@ -452,7 +452,7 @@ static id3_ucs4_t const *const genre_table[] = {
40 diff --git a/genre.dat.in b/genre.dat.in
41 index 872de40..e71e34b 100644
44 @@ -153,7 +153,7 @@ Freestyle
53 diff --git a/parse.c b/parse.c
54 index 86a3f21..947c249 100644
57 @@ -165,6 +165,9 @@ id3_ucs4_t *id3_parse_string(id3_byte_t const **ptr, id3_length_t length,
58 case ID3_FIELD_TEXTENCODING_UTF_8:
59 ucs4 = id3_utf8_deserialize(ptr, length);
62 + /* FIXME: Unknown encoding! Print warning? */
67 diff --git a/utf16.c b/utf16.c
68 index 70ee9d5..6e60a75 100644
71 @@ -282,5 +282,18 @@ id3_ucs4_t *id3_utf16_deserialize(id3_byte_t const **ptr, id3_length_t length,
75 + if (end == *ptr && length % 2 != 0)
77 + /* We were called with a bogus length. It should always
78 + * be an even number. We can deal with this in a few ways:
79 + * - Always give an error.
80 + * - Try and parse as much as we can and
81 + * - return an error if we're called again when we
82 + * already tried to parse everything we can.
83 + * - tell that we parsed it, which is what we do here.