mirror of
https://github.com/samba-team/samba.git
synced 2025-02-10 13:57:47 +03:00
vfs_virusfilter: Fix CID 1428739 Buffer not null terminated
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
9fc471242f
commit
8a4409c956
@ -148,10 +148,16 @@ bool virusfilter_io_connect_path(
|
||||
struct sockaddr_un addr;
|
||||
NTSTATUS status;
|
||||
int socket, bes_result, flags, ret;
|
||||
size_t len;
|
||||
|
||||
ZERO_STRUCT(addr);
|
||||
addr.sun_family = AF_UNIX;
|
||||
strncpy(addr.sun_path, path, sizeof(addr.sun_path));
|
||||
|
||||
len = strlcpy(addr.sun_path, path, sizeof(addr.sun_path));
|
||||
if (len >= sizeof(addr.sun_path)) {
|
||||
io_h->stream = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
status = open_socket_out((struct sockaddr_storage *)&addr, 0,
|
||||
io_h->connect_timeout,
|
||||
|
Loading…
x
Reference in New Issue
Block a user