Fix netdb stack overuse

This commit is contained in:
Jeremy Soller
2021-11-30 10:30:31 -07:00
parent 65bd3ed1e3
commit 6b46704ac3
+1 -1
View File
@@ -95,7 +95,7 @@ pub fn lookup_host(host: &str) -> Result<LookupHost, c_int> {
}
let i = 0 as socklen_t;
let mut buf = [0u8; 65536];
let mut buf = vec![0u8; 65536];
let buf_ptr = buf.as_mut_ptr() as *mut c_void;
let count = unsafe { sys_socket::recv(sock, buf_ptr, 65536, 0) };