Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/v7fs Fix off by one error.
details: https://anonhg.NetBSD.org/src/rev/2e00385420b0
branches: trunk
changeset: 783134:2e00385420b0
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Dec 07 06:50:15 2012 +0000
description:
Fix off by one error.
diffstat:
sys/fs/v7fs/v7fs_file.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 386c875515ec -r 2e00385420b0 sys/fs/v7fs/v7fs_file.c
--- a/sys/fs/v7fs/v7fs_file.c Fri Dec 07 05:56:30 2012 +0000
+++ b/sys/fs/v7fs/v7fs_file.c Fri Dec 07 06:50:15 2012 +0000
@@ -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 @@
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 {
Home |
Main Index |
Thread Index |
Old Index