From owner-freebsd-hackers Tue Feb 9 08:21:47 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA04876 for freebsd-hackers-outgoing; Tue, 9 Feb 1999 08:21:47 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from bubba.whistle.com (s205m7.whistle.com [207.76.205.7]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA04870 for ; Tue, 9 Feb 1999 08:21:45 -0800 (PST) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.2/8.9.2) id IAA32532; Tue, 9 Feb 1999 08:20:27 -0800 (PST) From: Archie Cobbs Message-Id: <199902091620.IAA32532@bubba.whistle.com> Subject: Re: Unsafe code in libc in 3.0-RELEASE FreeBSD i386 In-Reply-To: <199902090823.IAA12593@pc2etp.mephi.ru> from Igor Gousarov at "Feb 9, 99 08:19:08 am" To: igusarov@chat.ru (Igor Gousarov) Date: Tue, 9 Feb 1999 08:20:27 -0800 (PST) Cc: freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Igor Gousarov writes: > The source file for setlocale function (/usr/src/lib/libc/locale/setlocale.c) > contains the line which might put libc into infinite loop: > Line 172: while ( i < _LC_LAST ) > Should be replaced with > Line 172: for ( ; i < _LC_LAST ; i++ ) > > And there's one more line to correct in the same source file: > Line 178: if (category) > This line rely on the fact that LC_ALL is defined to be equal 0. Correct > statement should look like > Line 178: if ( category != LC_ALL ) Please file a PR to make sure that this doesn't "slip through the cracks"... Thanks, -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message