apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57295] apr_atoi64 truncating MSb on large apr_uint64_t number
Date Fri, 23 Mar 2018 09:01:34 GMT

Yann Ylavic <ylavic.dev@gmail.com> changed:

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

--- Comment #3 from Yann Ylavic <ylavic.dev@gmail.com> ---
I don't understand either, (apr_)strto[il]*() functions are documented to (and
actually do) return INT_/LONG_/LONG_LONG_MAX on overflow, and so are
(apr_)ato[il]*() based on them. The cast to apr_uint64_t won't change anything.

If truncation matters, one should use apr_strtoi64() and check *endptr.

The only issue is that APR is missing apr_{str,a}toui64(), if that's your point
please open a new "enhancement" request, or re-open this one.

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org

View raw message