Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/compat/linux/common/linux_file64.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/compat/linux/common/linux_file64.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.59.4.1 retrieving revision 1.59.4.2 diff -u -p -r1.59.4.1 -r1.59.4.2 --- src/sys/compat/linux/common/linux_file64.c 2019/06/10 22:07:00 1.59.4.1 +++ src/sys/compat/linux/common/linux_file64.c 2020/04/13 08:04:15 1.59.4.2 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_file64.c,v 1.59.4.1 2019/06/10 22:07:00 christos Exp $ */ +/* $NetBSD: linux_file64.c,v 1.59.4.2 2020/04/13 08:04:15 martin Exp $ */ /*- * Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.59.4.1 2019/06/10 22:07:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.59.4.2 2020/04/13 08:04:15 martin Exp $"); #include #include @@ -80,6 +80,7 @@ static void bsd_to_linux_stat(struct sta static void bsd_to_linux_stat(struct stat *bsp, struct linux_stat64 *lsp) { + memset(lsp, 0, sizeof(*lsp)); lsp->lst_dev = linux_fakedev(bsp->st_dev, 0); lsp->lst_ino = bsp->st_ino; lsp->lst_mode = (linux_mode_t)bsp->st_mode; @@ -352,6 +353,7 @@ again: * we have to worry about touching user memory outside of * the copyout() call). */ + memset(&idb, 0, sizeof(idb)); idb.d_ino = bdp->d_fileno; idb.d_type = bdp->d_type; idb.d_off = off;