Skip to main content

Module size

Module size 

Source
Expand description

Checked arithmetic over sizes read out of an untrusted buffer. Decoders take dimensions from the payload itself, so every product and sum derived from them is attacker-reachable and has to be range-checked before it is used as a length.

Functionsยง

checked_product
Product of factors, or an error naming label if it overflows usize.