diff --git a/include/fast_io_core_impl/socket/addrscn.h b/include/fast_io_core_impl/socket/addrscn.h index 0e10eeae..576e20c1 100644 --- a/include/fast_io_core_impl/socket/addrscn.h +++ b/include/fast_io_core_impl/socket/addrscn.h @@ -515,7 +515,11 @@ scn_cnt_define_in6addr_shorten_impl(char_type const *begin, char_type const *end // Here *it == ':' ++it; - if (it != end && *it == colon) + if (it == end) + { + return {it, parse_code::invalid}; + } + if (*it == colon) { // Encountered "::" if (colonp != nullptr) [[unlikely]]