While this is currently working fine as is, there is actually UB in this code, in both the read_chunked_utf8_string and the read_domainname function, as calling set_len on a vector before filling up that vector means that area of the vector, which is now considered initialized, is actually uninitialized.
Fix by using Vec::spare_capacity_mut.
While this is currently working fine as is, there is actually UB in this code, in both the
read_chunked_utf8_stringand theread_domainnamefunction, as callingset_lenon a vector before filling up that vector means that area of the vector, which is now considered initialized, is actually uninitialized.Fix by using
Vec::spare_capacity_mut.