Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Commit ff34749

Browse files
authored
Initialize sockaddr_un to fix valgrind uninitialised byte message. (yhirose#1547)
1 parent e5804d4 commit ff34749

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httplib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2668,7 +2668,7 @@ socket_t create_socket(const std::string &host, const std::string &ip, int port,
26682668

26692669
auto sock = socket(hints.ai_family, hints.ai_socktype, hints.ai_protocol);
26702670
if (sock != INVALID_SOCKET) {
2671-
sockaddr_un addr;
2671+
sockaddr_un addr {};
26722672
addr.sun_family = AF_UNIX;
26732673
std::copy(host.begin(), host.end(), addr.sun_path);
26742674

0 commit comments

Comments
 (0)