From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2980 invoked from network); 20 Mar 2023 21:19:53 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 20 Mar 2023 21:19:53 -0000 Received: (qmail 5567 invoked by uid 550); 20 Mar 2023 21:19:50 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 5532 invoked from network); 20 Mar 2023 21:19:49 -0000 Date: Mon, 20 Mar 2023 17:19:37 -0400 From: Rich Felker To: Bruno Haible Cc: musl@lists.openwall.com Message-ID: <20230320211937.GU4163@brightrain.aerifal.cx> References: <4620016.0WQXIW03uk@nimes> <20230320121559.GQ4163@brightrain.aerifal.cx> <20230320180842.GS4163@brightrain.aerifal.cx> <3481517.K71DO8KEF6@nimes> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3481517.K71DO8KEF6@nimes> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] swprintf: count returned by %n is wrong after conversion error On Mon, Mar 20, 2023 at 07:22:25PM +0100, Bruno Haible wrote: > Rich Felker wrote: > > There is probably also a similar issue in non-wide printf, but only > > for write errors, not for encoding errors, and only visibly wrong if > > the write error is transient (e.g. EAGAIN). > > Glad that you are seeing this by code inspection. Because in my test > suite, I only test the behaviour in case of encoding errors, not of > write errors. Thanks for reporting it. The underlying issue is somewhat larger than what you found, but your report gave the lead for discovering the rest. Rich