mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
Zero the whole struct not just the size of a pointer.
Found by: clang
This commit is contained in:
parent
d701ebcb13
commit
8f37d24bed
1 changed files with 1 additions and 1 deletions
|
|
@ -449,7 +449,7 @@ create_socket(char *sock_path, size_t sock_path_len, struct sockaddr_un *addr)
|
|||
goto failed;
|
||||
}
|
||||
|
||||
memset(addr, 0, sizeof(addr));
|
||||
memset(addr, 0, sizeof(*addr));
|
||||
addr->sun_family = AF_LOCAL;
|
||||
if (strlen(sock_path) >= sizeof(addr->sun_path)) {
|
||||
logmsgx("create_socket: too long path name (>= %lu) for local domain socket",
|
||||
|
|
|
|||
Loading…
Reference in a new issue