Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Feb 2001 02:41:20 +0300
From:      "Andrey A. Chernov" <ache@nagual.pp.ru>
To:        Alexey Zelkin <phantom@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc/locale fix_grouping.c Makefile.inc lmonetary.c lnumeric.c localeconv.c
Message-ID:  <20010211024118.A81751@nagual.pp.ru>
In-Reply-To: <20010210234017.A77336@nagual.pp.ru>; from ache@nagual.pp.ru on Sat, Feb 10, 2001 at 11:40:18PM %2B0300
References:  <200102101536.f1AFalt39792@freefall.freebsd.org> <20010210203601.A75114@nagual.pp.ru> <20010210221658.A55284@ark.cris.net> <20010210232201.A77154@nagual.pp.ru> <20010210234017.A77336@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 10, 2001 at 23:40:18 +0300, Andrey A. Chernov wrote:
> On Sat, Feb 10, 2001 at 23:22:01 +0300, Andrey A. Chernov wrote:
> > On Sat, Feb 10, 2001 at 22:16:58 +0200, Alexey Zelkin wrote:
> > > > lmonetary.c lnumeric.c:
> > > > C locale - numempty[] is wrong. It is double-converted as result. It must
> > > > be "-1".
> > > How ? Conversion is related to loaded locale part only. It does not
> > > affect predefined _C_ locale structures.
> > 
> > What happens if you load "C" or "POSIX" locale
> > explicetly? part_load_locale return 0 after checking for "POSIX" or "C",
> > i.e. ret == 0 and _fix_locale_grouping _happens_ on C locale, i.e. double
> > conversion happens.
> 
> What about changing 
> 	if (!ret)
> to
> 	if (!ret && _numeric_using_locale)

To be specific, in current form when "C" or "POSIX" locale
requested via setlocale() _fix_locale_grouping()
attempt to modify not filled _numeric_locale.grouping and what happens
depend of its previous contents. Various things, like modifying inproper
memory region, can happens.

-- 
Andrey A. Chernov
http://ache.pp.ru/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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