This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/17111] STRTOL(3) unexpected behavior when use '`' before number (i.e."```1") as argument of main ()


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]