summaryrefslogtreecommitdiffstats
path: root/audio-libs/libid3tag/patches/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch
diff options
context:
space:
mode:
Diffstat (limited to 'audio-libs/libid3tag/patches/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch')
-rw-r--r--audio-libs/libid3tag/patches/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/audio-libs/libid3tag/patches/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch b/audio-libs/libid3tag/patches/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch
new file mode 100644
index 0000000000..e2e6eaeb6d
--- /dev/null
+++ b/audio-libs/libid3tag/patches/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch
@@ -0,0 +1,21 @@
+--- libid3tag-0.15.1b/utf16.c
++++ libid3tag-0.15.1b/utf16.c
+@@ -282,5 +282,18 @@
+
+ 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;
+ }