123456789101112131415161718192021 |
- --- libid3tag-0.15.1b.orig/utf16.c 2004-01-23 10:41:32.000000000 +0100
- +++ libid3tag-0.15.1b/utf16.c 2013-10-16 12:34:27.000000000 +0200
- @@ -282,5 +282,18 @@ id3_ucs4_t *id3_utf16_deserialize(id3_by
-
- free(utf16);
-
- + if (end == *ptr && length % 2 != 0)
- + {
- + /* We were called with a bogus length. It should always
- + * be an even number. We can deal with this in a few ways:
- + * - Always give an error.
- + * - Try and parse as much as we can and
- + * - return an error if we're called again when we
- + * already tried to parse everything we can.
- + * - tell that we parsed it, which is what we do here.
- + */
- + (*ptr)++;
- + }
- +
- return ucs4;
- }
|