pub fn element_count(shape: &[u64]) -> Result<u64>Expand description
The number of elements a shape describes, refusing to wrap.
Every dimension is a uint64 read straight out of the tree, so the
product is attacker-controlled. [1 << 61, 8] wraps to zero and
[(1 << 63) + 1, 2] wraps to two – either of which walks straight past
a “does the block hold this much?” check that is done in the same
arithmetic.