diff options
author | Xi Wang <xi.wang@gmail.com> | 2012-02-16 17:55:48 +0100 |
---|---|---|
committer | Alex Elder <elder@dreamhost.com> | 2012-03-22 16:47:45 +0100 |
commit | 64486697771cbe219fffcb5c8e2ed9ca4fdf086c (patch) | |
tree | a623eebb8105ae8e7585c7faaf171729a9cbadbb /fs/ceph | |
parent | ceph: avoid panic with mismatched symlink sizes in fill_inode() (diff) | |
download | linux-64486697771cbe219fffcb5c8e2ed9ca4fdf086c.tar.xz linux-64486697771cbe219fffcb5c8e2ed9ca4fdf086c.zip |
libceph: fix overflow check in crush_decode()
The existing overflow check (n > ULONG_MAX / b) didn't work, because
n = ULONG_MAX / b would both bypass the check and still overflow the
allocation size a + n * b.
The correct check should be (n > (ULONG_MAX - a) / b).
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
0 files changed, 0 insertions, 0 deletions