Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/miscfs/kernfs Pull up following revision(s) (requeste...
details: https://anonhg.NetBSD.org/src/rev/a4be30c2bff5
branches: netbsd-3
changeset: 577551:a4be30c2bff5
user: tron <tron%NetBSD.org@localhost>
date: Thu Nov 24 22:11:11 2005 +0000
description:
Pull up following revision(s) (requested by christos in ticket #992):
sys/miscfs/kernfs/kernfs_vnops.c: revision 1.114 via patch
Fix 64 bit truncation problem reported by http://www.securitylab.net
diffstat:
sys/miscfs/kernfs/kernfs_vnops.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (48 lines):
diff -r 6972647b809a -r a4be30c2bff5 sys/miscfs/kernfs/kernfs_vnops.c
--- a/sys/miscfs/kernfs/kernfs_vnops.c Thu Nov 24 22:06:38 2005 +0000
+++ b/sys/miscfs/kernfs/kernfs_vnops.c Thu Nov 24 22:11:11 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernfs_vnops.c,v 1.107.2.3 2005/09/01 13:02:36 tron Exp $ */
+/* $NetBSD: kernfs_vnops.c,v 1.107.2.4 2005/11/24 22:11:11 tron Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.107.2.3 2005/09/01 13:02:36 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.107.2.4 2005/11/24 22:11:11 tron Exp $");
#ifdef _KERNEL_OPT
#include "opt_ipsec.h"
@@ -930,22 +930,22 @@
} */ *ap = v;
struct uio *uio = ap->a_uio;
struct kernfs_node *kfs = VTOKERN(ap->a_vp);
- char strbuf[KSTRING], *buf;
- off_t off;
+ char strbuf[KSTRING], *bf;
+ int off;
size_t len;
int error;
if (ap->a_vp->v_type == VDIR)
return (EOPNOTSUPP);
+ off = (int)uio->uio_offset;
/* Don't allow negative offsets */
- if (uio->uio_offset < 0)
+ if (off < 0)
return EINVAL;
- off = uio->uio_offset;
- buf = strbuf;
- if ((error = kernfs_xread(kfs, off, &buf, sizeof(strbuf), &len)) == 0)
- error = uiomove(buf, len, uio);
+ bf = strbuf;
+ if ((error = kernfs_xread(kfs, off, &bf, sizeof(strbuf), &len)) == 0)
+ error = uiomove(bf, len, uio);
return (error);
}
Home |
Main Index |
Thread Index |
Old Index