From sada@rr.iij4u.or.jp  Sat Oct 24 17:11:11 1998
Received: from rr.iij4u.or.jp (h028.p060.iij4u.or.jp [210.130.60.28])
          by hub.freebsd.org (8.8.8/8.8.8) with SMTP id RAA18179
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 24 Oct 1998 17:11:09 -0700 (PDT)
          (envelope-from sada@rr.iij4u.or.jp)
Received: (qmail 11337 invoked by uid 1000); 25 Oct 1998 09:10:35 +0900
Message-Id: <19981025001035.11336.qmail@sada.e-mail.ne.jp>
Date: 25 Oct 1998 09:10:35 +0900
From: sada@e-mail.ne.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: libc/locale/ansi.c problem
X-Send-Pr-Version: 3.2

>Number:         8437
>Category:       bin
>Synopsis:       libc/locale/ansi.c problem
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 24 17:20:01 PDT 1998
>Closed-Date:    Sat Oct 24 22:07:34 PDT 1998
>Last-Modified:  Sat Oct 24 22:08:09 PDT 1998
>Originator:     SADA Kenji
>Release:        FreeBSD 3.0-CURRENT
>Organization:
Nagoya.Aichi.Japan
>Environment:

	FreeBSD 3.0-CURRENT #0: Sun Oct 25 05:38:45 JST 1998
	XFree86 3.3.2.3

>Description:

	The file `/usr/src/lib/libc/locale/ansi.c' seems to have a bug
	and couse problems on treating Japanese locale functions.

>How-To-Repeat:

	Go <URL:http://www.bres.tsukuba.ac.jp/~yohta/netscape/>,
	see FreeBSD relating pages, and try the method:
	"How to set 'libxpg4.so.2.0' on LD_PRELOAD environment variable"

>Fix:
	
--- ansi.c.orig Thu Apr 18 16:01:46 1996
+++ ansi.c      Sat Oct 24 05:18:11 1998
@@ -132,7 +132,7 @@
        if (!pwcs || !s)
                return (-1);

-       while (n > 0) {
+       while ((signed int)n > 0) {
                if (*pwcs == 0) {
                        *s = 0;
                        break;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ache 
State-Changed-When: Sat Oct 24 22:07:34 PDT 1998 
State-Changed-Why:  
fixed differently in ansi.c v1.3 
>Unformatted:
