This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17111] STRTOL(3) unexpected behavior when use '`' before number (i.e."```1") as argument of main ()
- From: "sergey.churayev.76 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 04 Jul 2014 02:18:33 +0000
- Subject: [Bug libc/17111] STRTOL(3) unexpected behavior when use '`' before number (i.e."```1") as argument of main ()
- Auto-submitted: auto-generated
- References: <bug-17111-131 at http dot sourceware dot 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.