summaryrefslogtreecommitdiff
path: root/sys/miscfs/procfs
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2007-01-01 21:43:58 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2007-01-01 21:43:58 +0000
commit0ffffc267dedc2584c6afb53146c235ca6652cf2 (patch)
tree314195d667ef5ead433729fd982f18c1a496158e /sys/miscfs/procfs
parent0682a2d18736340f3560cd9784cee11b5ee0e949 (diff)
Allow reads of /proc/meminfo to be correctly terminated, okay thib@
Diffstat (limited to 'sys/miscfs/procfs')
-rw-r--r--sys/miscfs/procfs/procfs_linux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/miscfs/procfs/procfs_linux.c b/sys/miscfs/procfs/procfs_linux.c
index d3caeb8ae83..ff765b01c21 100644
--- a/sys/miscfs/procfs/procfs_linux.c
+++ b/sys/miscfs/procfs/procfs_linux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_linux.c,v 1.6 2005/04/21 23:28:55 deraadt Exp $ */
+/* $OpenBSD: procfs_linux.c,v 1.7 2007/01/01 21:43:57 pedro Exp $ */
/* $NetBSD: procfs_linux.c,v 1.2.4.1 2001/03/30 21:48:11 he Exp $ */
/*
@@ -90,7 +90,7 @@ procfs_domeminfo(struct proc *curp, struct proc *p, struct pfsnode *pfs,
PGTOKB(uvmexp.swpages - uvmexp.swpginuse));
if (len <= 0 || len >= sizeof buf ||
- len <= uio->uio_offset || uio->uio_resid == 0)
+ len < uio->uio_offset || uio->uio_resid == 0)
return EINVAL;
len -= uio->uio_offset;