From aeed6d0ca3a057333117f95b884f746d998b5257 Mon Sep 17 00:00:00 2001 From: tjr Date: Mon, 23 Feb 2004 01:40:46 +0000 Subject: 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. --- sys/isofs/cd9660/cd9660_vnops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/isofs/cd9660/cd9660_vnops.c') 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; } -- cgit v1.1