lkml.org 
[lkml]   [2002]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] NLS: Invalid koi8-ru return values
Hi Linus,
during my lurking around NLS code I found that KOI8-RU returns
character code instead of length of character for two characters.
Please apply.
Petr Vandrovec
vandrove@vc.cvut.cz

diff -urdN linux/fs/nls/nls_koi8-ru.c linux/fs/nls/nls_koi8-ru.c
--- linux/fs/nls/nls_koi8-ru.c Mon May 6 03:37:52 2002
+++ linux/fs/nls/nls_koi8-ru.c Tue May 7 10:02:26 2002
@@ -22,13 +22,14 @@
if ((uni & 0xffaf) == 0x040e || (uni & 0xffce) == 0x254c) {
/* koi8-ru and koi8-u differ only on two characters */
if (uni == 0x040e)
- return 0xbe;
+ out[0] = 0xbe;
else if (uni == 0x045e)
- return 0xae;
+ out[0] = 0xae;
else if (uni == 0x255d || uni == 0x256c)
return 0;
else
return p_nls->uni2char(uni, out, boundlen);
+ return 1;
}
else
/* fast path */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.025 / U:57.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site