The iBCS2 system call translator for statfs(2) did not check the

length parameter for validity.

Submitted by:	David Rhodus <drhodus@catpa.com>
This commit is contained in:
Jacques Vidrine 2003-08-10 23:26:16 +00:00
parent 41b3077a6c
commit e059b0f016

View File

@ -83,6 +83,10 @@ cvt_statfs(sp, buf, len)
{
struct ibcs2_statfs ssfs;
if (len < 0)
return (EINVAL);
else if (len > sizeof(ssfs))
len = sizeof(ssfs);
bzero(&ssfs, sizeof ssfs);
ssfs.f_fstyp = 0;
ssfs.f_bsize = sp->f_bsize;