All rules →
Rules / Rust
SHIELD-RUST-014

Potential integer overflow in allocation size

lowRustCWE-190CVSS 4

What it detects

with_capacity/Vec sizing from a multiplication of untrusted values can overflow.

How to fix

Use checked_mul and validate sizes before allocating from untrusted input.

Scan your repo freeFull documentation
Back to all rules
SHIELD-RUST-014: Potential integer overflow in allocation size — Zennoxa Shield