public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sergey.churayev.76 at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/17111] STRTOL(3) unexpected behavior when use '`' before number (i.e."```1") as argument of main ()
Date: Fri, 04 Jul 2014 02:18:00 -0000	[thread overview]
Message-ID: <bug-17111-131-GY2zkRVTPs@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-17111-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=17111

Sergey Churayev <sergey.churayev.76 at gmail dot com> changed:

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

--- Comment #4 from Sergey Churayev <sergey.churayev.76 at gmail dot com> ---
Yes, I know, but what happens if shell will send wrong data to this lib
function.

The program will:
1. Crash (BAD)
2. Or send to the top some silly value (MUCH WORSE).

Then it is really difficult find the place where when and why it happens. So,
will be better check arguments inside of function to prevent bad situations.

Anyway the function should not crash program or return to the top some nothing
meaningful value when accepting wrong arguments.

It is just string to integer conversion. The function must inform me about
problem. Same design conception must dominate with similar functions in C
standard libraries.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


  parent reply	other threads:[~2014-07-04  2:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-03 21:45 [Bug libc/17111] New: " sergey.churayev.76 at gmail dot com
2014-07-03 21:49 ` [Bug libc/17111] " sergey.churayev.76 at gmail dot com
2014-07-03 22:32 ` schwab@linux-m68k.org
2014-07-04  2:17 ` sergey.churayev.76 at gmail dot com
2014-07-04  2:18 ` sergey.churayev.76 at gmail dot com [this message]
2014-07-04  7:04 ` schwab@linux-m68k.org
2014-07-05  2:27 ` sergey.churayev.76 at gmail dot com
2014-07-05  7:03 ` schwab@linux-m68k.org
2014-07-05  7:57 ` sergey.churayev.76 at gmail dot com
2014-07-05  9:13 ` schwab@linux-m68k.org

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-17111-131-GY2zkRVTPs@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /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).