]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
delete queue-3.0/convert-properly-utf-8-to-utf-16.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2012 08:02:24 +0000 (17:02 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2012 08:02:24 +0000 (17:02 +0900)
queue-3.0/convert-properly-utf-8-to-utf-16.patch [deleted file]
queue-3.0/series

diff --git a/queue-3.0/convert-properly-utf-8-to-utf-16.patch b/queue-3.0/convert-properly-utf-8-to-utf-16.patch
deleted file mode 100644 (file)
index fde707a..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-From fd3ba42c76d3d4b776120c2b24c1791e7bb3deb1 Mon Sep 17 00:00:00 2001
-From: Frediano Ziglio <frediano.ziglio@citrix.com>
-Date: Tue, 7 Aug 2012 04:33:03 -0500
-Subject: Convert properly UTF-8 to UTF-16
-
-From: Frediano Ziglio <frediano.ziglio@citrix.com>
-
-commit fd3ba42c76d3d4b776120c2b24c1791e7bb3deb1 upstream.
-
-wchar_t is currently 16bit so converting a utf8 encoded characters not
-in plane 0 (>= 0x10000) to wchar_t (that is calling char2uni) lead to a
--EINVAL return. This patch detect utf8 in cifs_strtoUTF16 and add special
-code calling utf8s_to_utf16s.
-
-Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
-Acked-by: Jeff Layton <jlayton@redhat.com>
-Signed-off-by: Steve French <smfrench@gmail.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/cifs/cifs_unicode.c |   22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
---- a/fs/cifs/cifs_unicode.c
-+++ b/fs/cifs/cifs_unicode.c
-@@ -203,6 +203,27 @@ cifs_strtoUCS(__le16 *to, const char *fr
-       int i;
-       wchar_t wchar_to; /* needed to quiet sparse */
-+      /* special case for utf8 to handle no plane0 chars */
-+      if (!strcmp(codepage->charset, "utf8")) {
-+              /*
-+               * convert utf8 -> utf16, we assume we have enough space
-+               * as caller should have assumed conversion does not overflow
-+               * in destination len is length in wchar_t units (16bits)
-+               */
-+              i  = utf8s_to_utf16s(from, len, UTF16_LITTLE_ENDIAN,
-+                                     (wchar_t *) to, len);
-+
-+              /* if success terminate and exit */
-+              if (i >= 0)
-+                      goto success;
-+              /*
-+               * if fails fall back to UCS encoding as this
-+               * function should not return negative values
-+               * currently can fail only if source contains
-+               * invalid encoded characters
-+               */
-+      }
-+
-       for (i = 0; len && *from; i++, from += charlen, len -= charlen) {
-               charlen = codepage->char2uni(from, len, &wchar_to);
-               if (charlen < 1) {
-@@ -215,6 +236,7 @@ cifs_strtoUCS(__le16 *to, const char *fr
-               put_unaligned_le16(wchar_to, &to[i]);
-       }
-+success:
-       put_unaligned_le16(0, &to[i]);
-       return i;
- }
index a3f8341af688b55e636a85c10f1fb8e8b4c81223..0b3162556e8c6918ffbf6ffc7aafc3edc0b95f06 100644 (file)
@@ -82,4 +82,3 @@ mtd-nandsim-bugfix-fail-if-overridesize-is-too-big.patch
 mtd-nand-use-the-mirror-bbt-descriptor-when-reading-its-version.patch
 mtd-omap2-fix-omap_nand_remove-segfault.patch
 mtd-omap2-fix-module-loading.patch
-convert-properly-utf-8-to-utf-16.patch