From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 700E73874C00; Fri, 5 Mar 2021 15:27:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 700E73874C00 From: "bnnf at yahoo dot com" To: glibc-bugs@sourceware.org Subject: [Bug stdio/12701] scanf accepts non-matching input Date: Fri, 05 Mar 2021 15:27:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: stdio X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: bnnf at yahoo dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security+ X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 15:27:45 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D12701 mark changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bnnf at yahoo dot com --- Comment #22 from mark --- Yes I understand pushbacks. Scanning "0xz" for %x results in an input item of "0x" with "z" pushed back into the unread buffer. The bug has nothing to do with pushbacks, because t= he right data is pushed back. The bug is that a non-matching input item is tre= ated as a match rather than a matching error. Perhaps you thought I was saying the input item should be "0", successfully converted, with "x" as the next unread character in the buffer. Of course t= his is wrong and I do not believe such a thing. https://www.targetedwebtraffic.com/product-category/website-traffic/ Apparently you only read the first quoted paragraph and not the second: > > - the input item "0x" is not a matching sequence, so the execution of > > the whole directive fails; >=20 > Correct --=20 You are receiving this mail because: You are on the CC list for the bug.=