From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: segfault on sscanf Date: Thu, 14 Mar 2019 21:15:36 +0100 Message-ID: <20190314201535.GL26605@port70.net> References: <20190314104617.711ac7d8@faultier2go> <20190314162814.GI28106@voyager> <20190314165335.GJ28106@voyager> <20190314181919.GJ26605@port70.net> <20190314183812.GK28106@voyager> <20190314194933.GK26605@port70.net> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="252347"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) To: musl@lists.openwall.com Original-X-From: musl-return-13986-gllmg-musl=m.gmane.org@lists.openwall.com Thu Mar 14 21:15:53 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1h4Wlc-0013US-7P for gllmg-musl@m.gmane.org; Thu, 14 Mar 2019 21:15:52 +0100 Original-Received: (qmail 11365 invoked by uid 550); 14 Mar 2019 20:15:49 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 11344 invoked from network); 14 Mar 2019 20:15:49 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20190314194933.GK26605@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:13970 Archived-At: * Szabolcs Nagy [2019-03-14 20:49:34 +0100]: > * Markus Wichmann [2019-03-14 19:38:12 +0100]: > > > On Thu, Mar 14, 2019 at 07:19:19PM +0100, Szabolcs Nagy wrote: > > > i think __shgetc should ensure f->rpos == f->shend on EOF > > > > What about shunget(), though? Currently, if shgetc() returns EOF, at the > > i meant f->rpos == f->shend == 0. started with commit d6c855caa88ddb1ab6e24e23a14b1e7baf4ba9c7 "fix undefined behavior in strto* via FILE buffer pointer abuse" musl version 1.1.21