Module Name:    src
Committed By:   martin
Date:           Sun Aug  4 11:16:26 UTC 2019

Modified Files:
        src/sys/fs/cd9660 [netbsd-8]: cd9660_vnops.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1322):

        sys/fs/cd9660/cd9660_vnops.c: revision 1.55

Fix info leak: zero out the buffer, because it is not entirely filled, and
the uninitialized bytes get copied to userland in sys___getdens30(). Remove
unneeded cast while here.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.54.10.1 src/sys/fs/cd9660/cd9660_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/cd9660/cd9660_vnops.c
diff -u src/sys/fs/cd9660/cd9660_vnops.c:1.54 src/sys/fs/cd9660/cd9660_vnops.c:1.54.10.1
--- src/sys/fs/cd9660/cd9660_vnops.c:1.54	Sat Mar 12 02:36:25 2016
+++ src/sys/fs/cd9660/cd9660_vnops.c	Sun Aug  4 11:16:26 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd9660_vnops.c,v 1.54 2016/03/12 02:36:25 christos Exp $	*/
+/*	$NetBSD: cd9660_vnops.c,v 1.54.10.1 2019/08/04 11:16:26 martin Exp $	*/
 
 /*-
  * Copyright (c) 1994
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_vnops.c,v 1.54 2016/03/12 02:36:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_vnops.c,v 1.54.10.1 2019/08/04 11:16:26 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -399,7 +399,7 @@ cd9660_readdir(void *v)
 	imp = dp->i_mnt;
 	bmask = imp->im_bmask;
 
-	idp = (struct isoreaddir *)malloc(sizeof(*idp), M_TEMP, M_WAITOK);
+	idp = malloc(sizeof(*idp), M_TEMP, M_WAITOK | M_ZERO);
 	idp->saveent.d_namlen = idp->assocent.d_namlen = 0;
 	/*
 	 * XXX

Reply via email to