Module Name: src
Committed By: maxv
Date: Sat Jul 6 14:27:39 UTC 2019
Modified Files:
src/sys/kern: vfs_lookup.c
Log Message:
Fix (harmless) uninitialized variable. In the path
namei_tryemulroot -> namei_oneroot-> namei_start
There was a branch where 'ndp->ni_erootdir' was not initialized.
To generate a diff of this commit:
cvs rdiff -u -r1.210 -r1.211 src/sys/kern/vfs_lookup.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/kern/vfs_lookup.c
diff -u src/sys/kern/vfs_lookup.c:1.210 src/sys/kern/vfs_lookup.c:1.211
--- src/sys/kern/vfs_lookup.c:1.210 Sun Mar 17 10:14:52 2019
+++ src/sys/kern/vfs_lookup.c Sat Jul 6 14:27:38 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_lookup.c,v 1.210 2019/03/17 10:14:52 hannken Exp $ */
+/* $NetBSD: vfs_lookup.c,v 1.211 2019/07/06 14:27:38 maxv Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.210 2019/03/17 10:14:52 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.211 2019/07/06 14:27:38 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_magiclinks.h"
@@ -678,6 +678,7 @@ namei_start(struct namei_state *state, i
* POSIX.1 requirement: "" is not a valid file name.
*/
if (ndp->ni_pathlen == 1) {
+ ndp->ni_erootdir = NULL;
return ENOENT;
}