Back

LL047

Potential integer overflow

Object Pascal — Delphi & Free Pascal
Warning
Reliability

Integer multiplication or truncating casts can silently overflow, causing wrong results

Integer multiplication or truncating casts can silently overflow, causing wrong results.

Why this severity

Integer multiplication or truncating casts can silently overflow, causing wrong results.


Known false positives

values known to be small at runtime through domain constraints.

Remediation example

var
  Total: Int64;
begin
  Total := Int64(Width) * Int64(Height);
end;

Reconnecting… Connection lost. Reload