Cast block number to off_t to avoid possible overflow bugs.

Pointed out by: Bruce Evans <bde@zeta.org.au>
This commit is contained in:
John W. De Boskey 2000-10-24 03:28:59 +00:00
parent 45c29d5cda
commit 929f494bc7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67479

View File

@ -1380,7 +1380,7 @@ wtfs(bno, size, bf)
return;
done = 1;
}
if (wc_sect * sectorsize + wc_end == bno * sectorsize &&
if ((off_t)wc_sect * sectorsize + wc_end == (off_t)bno * sectorsize &&
wc_end + size <= WCSIZE) {
bcopy(bf, wc + wc_end, size);
wc_end += size;