Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 2003 00:24:50 +0900 (JST)
From:      Ryuichiro Imura <imura@ryu16.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/51798: sys/fs/ntfs/ntfs_subr.c ntfs_uastricmp() bug?
Message-ID:  <200305051524.h45FOoPk094520@redeye.xt.ryu16.org>
Resent-Message-ID: <200305051530.h45FUCq7066341@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         51798
>Category:       kern
>Synopsis:       sys/fs/ntfs/ntfs_subr.c ntfs_uastricmp() bug?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 05 08:30:12 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Ryuichiro Imura
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>Environment:
System: FreeBSD redeye.xt.ryu16.org 4.7-STABLE FreeBSD 4.7-STABLE #5: Mon Jan 13 22:18:39 JST 2003 root@vrs:/usr/obj/usr/src/sys/U1 i386


>Description:

ntfs_uastricmp() in src/sys/ntfs/ntfs_subr.c is curious.
I think it should compare unicode and ascii string case insens,
but it compares ascii string which converted from unicode string
and unicode string which converted from ascii string.
ntfs_uastrcmp() (difference from ntfs_uastricmp() is just case
sens or insens) looks fine.

Above paragraph may not hit you, so please look at the code.
If I'm wrong, just close this PR.


>How-To-Repeat:

>Fix:


Index: ntfs_subr.c
===================================================================
RCS file: /home/ncvs/src/sys/fs/ntfs/ntfs_subr.c,v
retrieving revision 1.29
diff -u -r1.29 ntfs_subr.c
--- ntfs_subr.c	4 Mar 2003 00:04:42 -0000	1.29
+++ ntfs_subr.c	5 May 2003 15:09:46 -0000
@@ -674,7 +674,7 @@
 	 */
 	for (i = 0; i < ustrlen && i < astrlen; i++) {
 		res = ((int) NTFS_TOUPPER(NTFS_82U(NTFS_U28(ustr[i])))) -
-			((int)NTFS_TOUPPER(NTFS_82U(astr[i])));
+			((int)NTFS_TOUPPER(astr[i]));
 		if (res)
 			return res;
 	}


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305051524.h45FOoPk094520>