mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-09 17:23:53 +00:00
Initialize sockaddr_un to fix valgrind uninitialised byte message. (#1547)
This commit is contained in:
parent
e5804d4a50
commit
ff34749572
@ -2668,7 +2668,7 @@ socket_t create_socket(const std::string &host, const std::string &ip, int port,
|
||||
|
||||
auto sock = socket(hints.ai_family, hints.ai_socktype, hints.ai_protocol);
|
||||
if (sock != INVALID_SOCKET) {
|
||||
sockaddr_un addr;
|
||||
sockaddr_un addr {};
|
||||
addr.sun_family = AF_UNIX;
|
||||
std::copy(host.begin(), host.end(), addr.sun_path);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user