public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bugdal at aerifal dot cx" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/12701] scanf accepts non-matching input
Date: Sat, 29 Oct 2011 21:24:00 -0000	[thread overview]
Message-ID: <bug-12701-131-yfYpA6np5S@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-12701-131@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=12701

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #9 from Rich Felker <bugdal at aerifal dot cx> 2011-10-29 21:24:08 UTC ---
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;
> 
> Correct

What part of "the execution of the whole directive fails" are you not
understanding? When a directive fails, scanf stops and returns the number of
directives successfully converted and stored. This number is zero, not two. The
%c is never processed. glibc is wrong. Please fix it.

If you insist on keeping compatibility with hypothetical existing binaries that
depend on the wrong behavior, that's what glibc has symbol versioning for...

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


  parent reply	other threads:[~2011-10-29 21:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-25 15:13 [Bug libc/12701] New: " bugdal at aerifal dot cx
2011-05-02  1:40 ` [Bug libc/12701] " drepper.fsp at gmail dot com
2011-05-02  2:36 ` bugdal at aerifal dot cx
2011-05-03  0:31 ` drepper.fsp at gmail dot com
2011-05-03  0:40 ` bugdal at aerifal dot cx
2011-05-03  1:14 ` drepper.fsp at gmail dot com
2011-05-03  2:24 ` bugdal at aerifal dot cx
2011-09-25  4:42 ` bugdal at aerifal dot cx
2011-10-29 17:14 ` drepper.fsp at gmail dot com
2011-10-29 21:24 ` bugdal at aerifal dot cx [this message]
2011-10-29 21:37 ` drepper.fsp at gmail dot com
2011-10-29 22:04 ` ldv at altlinux dot org
2011-10-30  5:43 ` bugdal at aerifal dot cx
2012-02-21  2:12 ` [Bug stdio/12701] " jsm28 at gcc dot gnu.org
2012-03-17 20:39 ` bugdal at aerifal dot cx
2012-03-18 17:17 ` jsm28 at gcc dot gnu.org
2012-04-18  5:23 ` bugdal at aerifal dot cx
2012-11-26  8:26 ` allachan at au1 dot ibm.com
2014-06-13 14:54 ` fweimer at redhat dot com
2014-06-27 14:00 ` fweimer at redhat dot com
2021-02-10 19:30 ` bnnf-yellowbot at blurcompany dot com
2021-03-05 15:27 ` bnnf at yahoo dot com
2021-09-15  2:40 ` namboru at jasaseo dot one
2023-07-18 11:44 ` vincent-srcware at vinc17 dot net
2023-07-18 12:01 ` vincent-srcware at vinc17 dot net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-12701-131-yfYpA6np5S@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).