HomeFreeBSD

Fix integer overflow in get_next_chunk()

Description

Fix integer overflow in get_next_chunk()

dn->dn_datablksz type is uint32_t and need to be casted to uint64_t
to avoid an overflow when the record size is greater than 4 MiB.

Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
Closes #8778
Closes #8797

Details

Provenance
madz <olivier.mazouffre@ims-bordeaux.fr>Authored on May 29 2019, 5:17 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 29 2019, 5:17 PM
Parents
rG46df7e6cc97c: grammar: it is / plural agreement
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGec4afd27f198: Fix integer overflow in get_next_chunk() (authored by madz <olivier.mazouffre@ims-bordeaux.fr>).May 29 2019, 5:17 PM