diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1996-01-01 20:20:45 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1996-01-01 20:20:45 +0000 |
| commit | 18e73f4fb6967ee696a9b2fea69e9b1c3467211d (patch) | |
| tree | 2fd7788cf6daf241e2799b249b0046bbcf5a3765 /sys/miscfs/specfs | |
| parent | daa0d839fc5b52932dc797b6895469a8c020f85b (diff) | |
Notes
Diffstat (limited to 'sys/miscfs/specfs')
| -rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 14d9939842ee..a78298e342d8 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)spec_vnops.c 8.6 (Berkeley) 4/9/94 - * $Id: spec_vnops.c,v 1.25 1995/12/13 15:13:31 julian Exp $ + * $Id: spec_vnops.c,v 1.26 1995/12/14 09:53:06 phk Exp $ */ #include <sys/param.h> @@ -756,6 +756,12 @@ spec_getpages(ap) */ blkno = (IDX_TO_OFF(ap->a_m[0]->pindex) + ap->a_offset) / DEV_BSIZE; + /* XXX sanity check before we go into details */ + if (blkno < 0) { + printf("spec_getpages: negative blkno (%ld)\n", blkno); + return (VM_PAGER_ERROR); + } + /* * Round up physical size for real devices. */ |
