Package: exfat-fuse
Version: 0.9.7-1
Severity: normal
Tags: patch

Incorrect UTF-16 handling (the values in surrogates are after substracting 
0x10000, not raw values.

diff -ur -p fuse-exfat-0.9.7/libexfat/utf.c fuse-exfat-0.9.7-mod/libexfat/utf.c
--- fuse-exfat-0.9.7/libexfat/utf.c     2012-03-08 08:26:52.000000000 +0100
+++ fuse-exfat-0.9.7-mod/libexfat/utf.c 2012-05-14 17:14:26.044333001 +0200
@@ -89,6 +89,7 @@ static const le16_t* utf16_to_wchar(cons
                        return NULL;
                *wc = ((wchar_t) (le16_to_cpu(input[0]) & 0x3ff) << 10);
                *wc |= (le16_to_cpu(input[1]) & 0x3ff);
+               *wc += 0x10000;
                return input + 2;
        }
        else
@@ -186,6 +187,7 @@ static le16_t* wchar_to_utf16(le16_t* ou
        }
        if (outsize < 2)
                return NULL;
+       wc -= 0x10000;
        output[0] = cpu_to_le16(0xd800 | ((wc >> 10) & 0x3ff));
        output[1] = cpu_to_le16(0xdc00 | (wc & 0x3ff));
        return output + 2;

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.4.0-rc7-fs+ (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages exfat-fuse depends on:
ii  fuse      2.8.7-2
ii  libc6     2.13-32
ii  libfuse2  2.8.7-2

Versions of packages exfat-fuse recommends:
ii  exfat-utils  0.9.7-1

exfat-fuse suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to