From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: wcsncpy bug Date: Sun, 22 May 2011 22:00:55 -0400 Message-ID: <20110523020055.GU277@brightrain.aerifal.cx> References: <20110523012547.GH6142@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1306116671 21809 80.91.229.12 (23 May 2011 02:11:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 23 May 2011 02:11:11 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-94-gllmg-musl=m.gmane.org@lists.openwall.com Mon May 23 04:11:01 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1QOKbl-00087t-Cr for gllmg-musl@lo.gmane.org; Mon, 23 May 2011 04:11:01 +0200 Original-Received: (qmail 32752 invoked by uid 550); 23 May 2011 02:11:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32738 invoked from network); 23 May 2011 02:11:00 -0000 Content-Disposition: inline In-Reply-To: <20110523012547.GH6142@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:11 Archived-At: On Mon, May 23, 2011 at 03:25:47AM +0200, Szabolcs Nagy wrote: > wcsncpy(d,s,n) did not decrease n while copying the '\0' > so when s[0]=0 and n=1 it wrote 2 zeros to d I believe I have fixed this bug, and similar bugs in strncat and wcsncat. Please let me know if they still have problems. Rich