Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ceph: fix bounds check in ceph_decode_need and ceph_encode_need
Given a large n, the bounds check (*p + n > end) can be bypassed due to pointer wraparound. A safer check is (n > end - *p). [[email protected]: inverted test and renamed ceph_has_room()] Signed-off-by: Xi Wang <[email protected]> Reviewed-by: Alex Elder <[email protected]>
- Loading branch information