[PATCH 02/11] xfsprogs: fix integer overflow in xlog_find_verify_cycle
VIVEK TRIVEDI
t.vivek at samsung.com
Fri Dec 4 06:01:32 CST 2015
> Ummm, in isolation that change is technically correct, but when you
> look at what bufblks contains it is clearly wrong. nbblks is an
> int, so "1 << ffs(nbblks)" should not be larger than an int.
> i.e. bufblks is simply a count of blocks in the log, which by
> definition cannot be more than an int (in fact, 2^31 / 2^9 is the
> largest legal value it can have). Hence it can't be larger than an
> int, and all the functions it is passed to expect it to be an
> int...
>
>Hence the use of xfs_daddr_t is wrong, and that's the first thing
>that needs fixing....
thanks for review!
I will resend updated patch.
thanks!
More information about the xfs
mailing list