You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use parse_object_bits_encoding in parse_object_bits_encoding
The previous use of `unsafe_string2unsigned` handled non numeric input
based on the behaviour of 0 being returned by `unsafe_string2unsigned`,
which is then caught by the subsequent range check. It was well defined
behaviour of `std::strtoul`. However this was only discoverable, based
on looking at the implementation of `unsafe_string2unsigned` and reading
the documentation of `std::strtoul` or by using a debugger. The explict
check in the refactored version makes the handling of this case clear
from reading `parse_object_bits_encoding` only, without reference to
other code or documentation.
0 commit comments