[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #31475 [Core Tor/Tor]: config: stop using atof()
#31475: config: stop using atof()
--------------------------+------------------------------------
Reporter: nickm | Owner: nickm
Type: defect | Status: needs_revision
Priority: Low | Milestone: Tor: 0.4.2.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points: 0.5
Reviewer: | Sponsor:
--------------------------+------------------------------------
Comment (by nickm):
I agree with your observation about overflow/underflow: I'll try to fix
those.
I don't think that checking the return value for 0 is a good idea though,
for two reasons:
1. Our compilers give warnings when you do an `==` comparison with two
doubles, so we'd have to work around that.
2. My understanding is that the only way that `*endptr` can be equal to
`nptr` is if no input is converted at all. If any input is converted, then
`*endptr` points to the first unconverted byte.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31475#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs