2 ## 10_utf16.dpatch by <kurt@roeckx.be>
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Handle bogus UTF16 sequences that have a length that is not
6 ## DP: an even number of 8 bit characters.
9 echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
13 [ -f debian
/patches
/00patch-opts
] && . debian
/patches
/00patch-opts
14 patch_opts
="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
17 -patch) patch -p1 ${patch_opts} < $0;;
18 -unpatch) patch -R -p1 ${patch_opts} < $0;;
20 echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
27 diff -urNad libid3tag-0.15
.1b
/utf16.c
/tmp
/dpep.tKvO7a
/libid3tag-0.15
.1b
/utf16.c
28 --- libid3tag-0.15
.1b
/utf16.c
2006-01-13 15:26:29.000000000 +0100
29 +++ /tmp
/dpep.tKvO7a
/libid3tag-0.15
.1b
/utf16.c
2006-01-13 15:27:19.000000000 +0100
34 + if (end
== *ptr
&& length
% 2 != 0)
36 + /* We were called with a bogus length. It should always
37 + * be an even number. We can deal with this
in a few ways
:
38 + * - Always give an error.
39 + * - Try and parse as much as we can and
40 + * - return an error
if we
're called again when we
41 + * already tried to parse everything we can.
42 + * - tell that we parsed it, which is what we do here.