mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-18 15:53:37 +00:00
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
45c29d5cda
commit
929f494bc7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67479
|
@ -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 a new issue