Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/linux/common Fix info leak.



details:   https://anonhg.NetBSD.org/src/rev/f7e14168cef1
branches:  trunk
changeset: 459079:f7e14168cef1
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Aug 23 06:54:54 2019 +0000

description:
Fix info leak.

diffstat:

 sys/compat/linux/common/linux_file64.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r f42ef1c21227 -r f7e14168cef1 sys/compat/linux/common/linux_file64.c
--- a/sys/compat/linux/common/linux_file64.c    Fri Aug 23 06:47:58 2019 +0000
+++ b/sys/compat/linux/common/linux_file64.c    Fri Aug 23 06:54:54 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_file64.c,v 1.60 2018/09/03 16:29:29 riastradh Exp $      */
+/*     $NetBSD: linux_file64.c,v 1.61 2019/08/23 06:54:54 maxv Exp $   */
 
 /*-
  * Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.60 2018/09/03 16:29:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.61 2019/08/23 06:54:54 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -80,6 +80,7 @@
 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;



Home | Main Index | Thread Index | Old Index