summaryrefslogtreecommitdiff
path: root/package/libid3tag/patches/patch-utf16_c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-10-16 12:55:52 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2013-10-16 12:55:52 +0200
commit232f2bdaac85236e2a89fde387359dc8d12c6ff0 (patch)
tree08d33ef841ef9494ae611e55a524a5dbcc743029 /package/libid3tag/patches/patch-utf16_c
parent1783cc1ff51b6aee8dfe94fff2d80013f92cffdd (diff)
finally found the problem for oom killer with mpd, add Debian patches which fixes it, evil ยต in ID3 tag
Diffstat (limited to 'package/libid3tag/patches/patch-utf16_c')
-rw-r--r--package/libid3tag/patches/patch-utf16_c21
1 files changed, 21 insertions, 0 deletions
diff --git a/package/libid3tag/patches/patch-utf16_c b/package/libid3tag/patches/patch-utf16_c
new file mode 100644
index 000000000..1466ebdf7
--- /dev/null
+++ b/package/libid3tag/patches/patch-utf16_c
@@ -0,0 +1,21 @@
+--- 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;
+ }