diff --git a/sys/compat/cloudabi/cloudabi_file.c b/sys/compat/cloudabi/cloudabi_file.c index 6133ddd6ae54..5811c0bbb314 100644 --- a/sys/compat/cloudabi/cloudabi_file.c +++ b/sys/compat/cloudabi/cloudabi_file.c @@ -563,6 +563,8 @@ cloudabi_sys_file_stat_fget(struct thread *td, cloudabi_filetype_t filetype; int error; + memset(&csb, 0, sizeof(csb)); + /* Fetch file descriptor attributes. */ error = fget(td, uap->fd, cap_rights_init(&rights, CAP_FSTAT), &fp); if (error != 0) @@ -650,6 +652,8 @@ cloudabi_sys_file_stat_get(struct thread *td, char *path; int error; + memset(&csb, 0, sizeof(csb)); + error = copyin_path(uap->path, uap->path_len, &path); if (error != 0) return (error);