From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11714 Path: news.gmane.org!.POSTED!not-for-mail From: Jens Gustedt Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] handle whitespace before %% in scanf Date: Mon, 10 Jul 2017 16:44:45 +0200 Organization: inria.fr Message-ID: <20170710164445.53ef621d@inria.fr> References: <20170709210018.16369-1-b.brachaczek@gmail.com> <20170710020047.GL1627@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/=8OTox5eP/yhir1Dn1ej3az"; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1499697906 1739 195.159.176.226 (10 Jul 2017 14:45:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Jul 2017 14:45:06 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-11727-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jul 10 16:45:02 2017 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.84_2) (envelope-from ) id 1dUZvo-00007Z-IB for gllmg-musl@m.gmane.org; Mon, 10 Jul 2017 16:45:00 +0200 Original-Received: (qmail 32539 invoked by uid 550); 10 Jul 2017 14:45:04 -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 32521 invoked from network); 10 Jul 2017 14:45:03 -0000 X-IronPort-AV: E=Sophos;i="5.40,340,1496095200"; d="scan'208";a="282816682" In-Reply-To: X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) X-Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAACRQTFRFERslNjAsLTE9Ok9wUk9TaUs8iWhSrYZkj42Rz6aD3sGZ Xref: news.gmane.org gmane.linux.lib.musl.general:11714 Archived-At: --Sig_/=8OTox5eP/yhir1Dn1ej3az Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello Bartosz, On Mon, 10 Jul 2017 10:22:37 +0200 Bartosz Brachaczek wrote: > > EXAMPLE 5 The call: > >=20 > > #include > > /* ... */ > > int n, i; > > n =3D sscanf("foo % bar 42", "foo%%bar%d", &i); > >=20 > > will assign to 'n' the value 1 and to 'i' the value 42 because input > > white-space characters are skipped for both the '%' and 'd' > > conversion specifiers. =20 >=20 > Now, the code in the example is clearly broken, as either the format=20 > string should be "foo%% bar%d" or the input string should be > "foo %bar 42", but the explanation does imply that '%%' consumes > whitespace. Yes, I have noted this as an editorial fix for C17 Thanks for reporting Jens --=20 :: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS ::: :: ::::::::::::::: office Strasbourg : +33 368854536 :: :: :::::::::::::::::::::: gsm France : +33 651400183 :: :: ::::::::::::::: gsm international : +49 15737185122 :: :: http://icube-icps.unistra.fr/index.php/Jens_Gustedt :: --Sig_/=8OTox5eP/yhir1Dn1ej3az Content-Type: application/pgp-signature Content-Description: Digitale Signatur von OpenPGP -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSN9stI2OFN1pLljN0P0+hp2tU34gUCWWOS3gAKCRAP0+hp2tU3 4nt7AJoDyqoMD8qTOJI6GHbdDKQ/M22xZgCgk31ja/hkewyG7ZDLnIcb6P1UXK4= =9m/c -----END PGP SIGNATURE----- --Sig_/=8OTox5eP/yhir1Dn1ej3az--