Module Name: src
Committed By: msaitoh
Date: Fri Dec 7 06:50:15 UTC 2012
Modified Files:
src/sys/fs/v7fs: v7fs_file.c
Log Message:
Fix off by one error.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/fs/v7fs/v7fs_file.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/v7fs/v7fs_file.c
diff -u src/sys/fs/v7fs/v7fs_file.c:1.4 src/sys/fs/v7fs/v7fs_file.c:1.5
--- src/sys/fs/v7fs/v7fs_file.c:1.4 Wed Mar 21 15:55:50 2012
+++ src/sys/fs/v7fs/v7fs_file.c Fri Dec 7 06:50:15 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: v7fs_file.c,v 1.4 2012/03/21 15:55:50 christos Exp $ */
+/* $NetBSD: v7fs_file.c,v 1.5 2012/12/07 06:50:15 msaitoh Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: v7fs_file.c,v 1.4 2012/03/21 15:55:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: v7fs_file.c,v 1.5 2012/12/07 06:50:15 msaitoh Exp $");
#if defined _KERNEL_OPT
#include "opt_v7fs.h"
#endif
@@ -76,7 +76,7 @@ v7fs_file_lookup_by_name(struct v7fs_sel
if ((q = strchr(name, '/'))) {
/* Zap following path. */
- len = MIN(V7FS_NAME_MAX + 1, q - name);
+ len = MIN(V7FS_NAME_MAX, q - name);
memcpy(filename, name, len);
filename[len] = '\0'; /* '/' -> '\0' */
} else {