Skip to content
Snippets Groups Projects
Verified Commit 6b46704a authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Fix netdb stack overuse

parent 65bd3ed1
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,7 @@ pub fn lookup_host(host: &str) -> Result<LookupHost, c_int> { ...@@ -95,7 +95,7 @@ pub fn lookup_host(host: &str) -> Result<LookupHost, c_int> {
} }
let i = 0 as socklen_t; 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 buf_ptr = buf.as_mut_ptr() as *mut c_void;
let count = unsafe { sys_socket::recv(sock, buf_ptr, 65536, 0) }; let count = unsafe { sys_socket::recv(sock, buf_ptr, 65536, 0) };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment