From owner-freebsd-hackers Mon Feb 8 21:19:20 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA05735 for freebsd-hackers-outgoing; Mon, 8 Feb 1999 21:19:20 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from pc2etp.mephi.ru (pc2etp.mephi.ru [194.67.66.87]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA05723 for ; Mon, 8 Feb 1999 21:19:11 -0800 (PST) (envelope-from igusarov@chat.ru) Received: from piglet ([194.67.67.195]) by pc2etp.mephi.ru (8.8.8/8.8.8) with ESMTP id IAA12593 for ; Tue, 9 Feb 1999 08:23:09 GMT (envelope-from igusarov@chat.ru) Message-Id: <199902090823.IAA12593@pc2etp.mephi.ru> From: "Igor Gousarov" To: Subject: Unsafe code in libc in 3.0-RELEASE FreeBSD i386 Date: Tue, 9 Feb 1999 08:19:08 +0300 X-MSMail-Priority: Normal X-Priority: 3 X-Mailer: Microsoft Internet Mail 4.70.1155 MIME-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 ) --------------------------------------------------- Igor A. Goussarov, igusarov@chat.ru, ICQ UIN 11267740 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message