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:
parent
a800a462ef
commit
869ef8b48c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user