[Midnightbsd-cvs] src [7618] stable/0.7/sys/kern/vfs_syscalls.c: Legacy stat(2) system call for compat bsd43 does not clear the output struct before copying it out to userland.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue May 31 18:08:26 EDT 2016


Revision: 7618
          http://svnweb.midnightbsd.org/src/?rev=7618
Author:   laffer1
Date:     2016-05-31 18:08:25 -0400 (Tue, 31 May 2016)
Log Message:
-----------
Legacy stat(2) system call for compat bsd43 does not clear the output struct before copying it out to userland.

Modified Paths:
--------------
    stable/0.7/sys/kern/vfs_syscalls.c

Modified: stable/0.7/sys/kern/vfs_syscalls.c
===================================================================
--- stable/0.7/sys/kern/vfs_syscalls.c	2016-05-31 22:06:51 UTC (rev 7617)
+++ stable/0.7/sys/kern/vfs_syscalls.c	2016-05-31 22:08:25 UTC (rev 7618)
@@ -2330,6 +2330,7 @@
 	struct ostat *ost;
 {
 
+	bzero(ost, sizeof(*ost));
 	ost->st_dev = st->st_dev;
 	ost->st_ino = st->st_ino;
 	ost->st_mode = st->st_mode;



More information about the Midnightbsd-cvs mailing list