Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-1]: src/sys/miscfs/kernfs Pull up following revision(s) (reques...
details: https://anonhg.NetBSD.org/src/rev/0c91a6997dd4
branches: netbsd-2-1
changeset: 564122:0c91a6997dd4
user: tron <tron%NetBSD.org@localhost>
date: Tue Nov 29 12:35:43 2005 +0000
description:
Pull up following revision(s) (requested by christos in ticket #10155):
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 | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (40 lines):
diff -r 191377808824 -r 0c91a6997dd4 sys/miscfs/kernfs/kernfs_vnops.c
--- a/sys/miscfs/kernfs/kernfs_vnops.c Mon Nov 14 22:38:46 2005 +0000
+++ b/sys/miscfs/kernfs/kernfs_vnops.c Tue Nov 29 12:35:43 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernfs_vnops.c,v 1.98.2.3.2.3 2005/09/01 16:43:41 riz Exp $ */
+/* $NetBSD: kernfs_vnops.c,v 1.98.2.3.2.3.2.1 2005/11/29 12:35:43 tron Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.98.2.3.2.3 2005/09/01 16:43:41 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.98.2.3.2.3.2.1 2005/11/29 12:35:43 tron Exp $");
#ifdef _KERNEL_OPT
#include "opt_ipsec.h"
@@ -931,18 +931,18 @@
struct uio *uio = ap->a_uio;
struct kernfs_node *kfs = VTOKERN(ap->a_vp);
char strbuf[KSTRING], *buf;
- off_t off;
+ 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);
Home |
Main Index |
Thread Index |
Old Index