uri-library
uri-library copied to clipboard
Argument of std::isalnum() and friends should be unsigned char
As noted at https://en.cppreference.com/w/cpp/string/byte/isalnum#Notes:
Like all other functions from <cctype>, the behavior of std::isalnum is undefined if the argument's value is neither representable as unsigned char nor equal to EOF. To use these functions safely with plain chars (or signed chars), the argument should first be converted to unsigned char.
Use of std::isalnum() and std::isdigit() in uri.hh does not respect this. The arguments should be type-casted to unsigned char.