Add safety comment to stdlib/src/ssl.rs
@@ -145,6 +145,7 @@ fn obj2txt(obj: &Asn1ObjectRef, no_name: bool) -> Option<String> {
no_name,
);
assert!(ret >= 0);
+ // SAFETY: set_len is safe when capacity is enoguh and all values are already initialized
buf.set_len(buflen);
String::from_utf8(buf)
.unwrap_or_else(|e| String::from_utf8_lossy(e.as_bytes()).into_owned())
