summaryrefslogtreecommitdiffstats
path: root/sys/isofs
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2004-02-23 01:40:46 +0000
committertjr <tjr@FreeBSD.org>2004-02-23 01:40:46 +0000
commitaeed6d0ca3a057333117f95b884f746d998b5257 (patch)
tree9601ffbe7f478849c2c34b5409604e83aec36070 /sys/isofs
parent3ae42dea9b7b0cd37170b709f11ec7c0823c5eea (diff)
downloadFreeBSD-src-aeed6d0ca3a057333117f95b884f746d998b5257.zip
FreeBSD-src-aeed6d0ca3a057333117f95b884f746d998b5257.tar.gz
cookies is an array of u_long, not u_int, so MALLOC() it accordingly.
Allocating it with the wrong size could have caused corruption on 64-bit architectures.
Diffstat (limited to 'sys/isofs')
-rw-r--r--sys/isofs/cd9660/cd9660_vnops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c
index 5105322..eae8967 100644
--- a/sys/isofs/cd9660/cd9660_vnops.c
+++ b/sys/isofs/cd9660/cd9660_vnops.c
@@ -469,8 +469,8 @@ cd9660_readdir(ap)
* Guess the number of cookies needed.
*/
ncookies = uio->uio_resid / 16;
- MALLOC(cookies, u_long *, ncookies * sizeof(u_int), M_TEMP,
- M_WAITOK);
+ MALLOC(cookies, u_long *, ncookies * sizeof(u_long),
+ M_TEMP, M_WAITOK);
idp->cookies = cookies;
idp->ncookies = ncookies;
}
OpenPOWER on IntegriCloud