diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-09-16 00:42:45 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-09-16 00:42:45 +0000 |
commit | dcf53c92ea15715a4406b9230a1c68943501ffb2 (patch) | |
tree | 1d6ac3cb6ae47126af1dc54f4f0f5bac7afc49b7 /sys/dev/ccdvar.h | |
parent | 3b1414ef904bbd7e35b23fc1509a3ea20e822cae (diff) |
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.
Diffstat (limited to 'sys/dev/ccdvar.h')
-rw-r--r-- | sys/dev/ccdvar.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ccdvar.h b/sys/dev/ccdvar.h index 20e5b5098a3..08c54bf91c0 100644 --- a/sys/dev/ccdvar.h +++ b/sys/dev/ccdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ccdvar.h,v 1.4 1997/11/26 22:30:19 niklas Exp $ */ +/* $OpenBSD: ccdvar.h,v 1.5 2001/09/16 00:42:44 millert Exp $ */ /* $NetBSD: ccdvar.h,v 1.11 1996/02/28 01:08:32 thorpej Exp $ */ /*- @@ -105,7 +105,7 @@ struct ccddevice { */ struct ccd_ioctl { char **ccio_disks; /* pointer to component paths */ - int ccio_ndisks; /* number of disks to concatenate */ + u_int ccio_ndisks; /* number of disks to concatenate */ int ccio_ileave; /* interleave (DEV_BSIZE blocks) */ int ccio_flags; /* misc. information */ int ccio_unit; /* unit number: use varies */ @@ -185,7 +185,8 @@ struct ccd_softc { int sc_cflags; /* configuration flags */ size_t sc_size; /* size of ccd */ int sc_ileave; /* interleave */ - int sc_nccdisks; /* number of components */ +#define CCD_MAXNDISKS 65536 + u_int sc_nccdisks; /* number of components */ struct ccdcinfo *sc_cinfo; /* component info */ struct ccdiinfo *sc_itable; /* interleave table */ struct ccdgeom sc_geom; /* pseudo geometry info */ |