summaryrefslogtreecommitdiffstats
path: root/abs/core/libid3tag/10_utf16.diff
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-08-07 14:57:31 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-08-07 14:57:31 (GMT)
commit356f47550a1d05cd1115e186a6816d614bbf8eeb (patch)
tree7d18aa942f4fb19a8e307a643f3b7bfdbb4c0fe4 /abs/core/libid3tag/10_utf16.diff
parent3599272b7174dfa23c0633d5a63cd2c83f94211e (diff)
downloadlinhes_pkgbuild-356f47550a1d05cd1115e186a6816d614bbf8eeb.zip
linhes_pkgbuild-356f47550a1d05cd1115e186a6816d614bbf8eeb.tar.gz
linhes_pkgbuild-356f47550a1d05cd1115e186a6816d614bbf8eeb.tar.bz2
libid3tag .15.1b
Diffstat (limited to 'abs/core/libid3tag/10_utf16.diff')
-rw-r--r--abs/core/libid3tag/10_utf16.diff48
1 files changed, 48 insertions, 0 deletions
diff --git a/abs/core/libid3tag/10_utf16.diff b/abs/core/libid3tag/10_utf16.diff
new file mode 100644
index 0000000..a3218d2
--- /dev/null
+++ b/abs/core/libid3tag/10_utf16.diff
@@ -0,0 +1,48 @@
+#! /bin/sh -e
+## 10_utf16.dpatch by <kurt@roeckx.be>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Handle bogus UTF16 sequences that have a length that is not
+## DP: an even number of 8 bit characters.
+
+if [ $# -lt 1 ]; then
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+ -patch) patch -p1 ${patch_opts} < $0;;
+ -unpatch) patch -R -p1 ${patch_opts} < $0;;
+ *)
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad libid3tag-0.15.1b/utf16.c /tmp/dpep.tKvO7a/libid3tag-0.15.1b/utf16.c
+--- libid3tag-0.15.1b/utf16.c 2006-01-13 15:26:29.000000000 +0100
++++ /tmp/dpep.tKvO7a/libid3tag-0.15.1b/utf16.c 2006-01-13 15:27:19.000000000 +0100
+@@ -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;
+ }