Use std::numeric_limits instead of UCHAR_MAX.