From imura@ryu16.org  Mon May  5 08:25:37 2003
Return-Path: <imura@ryu16.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7B3F237B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  5 May 2003 08:25:37 -0700 (PDT)
Received: from mail.ryu16.org (YahooBB219005044040.bbtec.net [219.5.44.40])
	by mx1.FreeBSD.org (Postfix) with ESMTP id AF37E43F75
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  5 May 2003 08:25:35 -0700 (PDT)
	(envelope-from imura@ryu16.org)
Received: from redeye.xt.ryu16.org (localhost [IPv6:::1])
	by mail.ryu16.org (8.12.6/8.12.5) with ESMTP id h45FOotW094521
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 6 May 2003 00:24:50 +0900 (JST)
	(envelope-from imura@redeye.xt.ryu16.org)
Received: (from imura@localhost)
	by redeye.xt.ryu16.org (8.12.6/8.12.6/Submit) id h45FOoPk094520;
	Tue, 6 May 2003 00:24:50 +0900 (JST)
Message-Id: <200305051524.h45FOoPk094520@redeye.xt.ryu16.org>
Date: Tue, 6 May 2003 00:24:50 +0900 (JST)
From: Ryuichiro Imura <imura@ryu16.org>
Reply-To: Ryuichiro Imura <imura@ryu16.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: sys/fs/ntfs/ntfs_subr.c ntfs_uastricmp() bug?
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>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:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 05 08:30:12 PDT 2003
>Closed-Date:    Tue May 06 02:37:06 PDT 2003
>Last-Modified:  Tue May 06 02:37:06 PDT 2003
>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:

From: "R. Imura" <imura@ryu16.org>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Cc:  
Subject: Re: kern/51798: sys/fs/ntfs/ntfs_subr.c ntfs_uastricmp() bug?
Date: Tue, 6 May 2003 00:36:06 +0900

 Sorry, I was wrong.
 I got drunk... :)
 
 - R. Imura
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Tue May 6 02:36:43 PDT 2003 
State-Changed-Why:  
Pilot error. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=51798 
>Unformatted:
