Skip to content

Files

Latest commit

 

History

History
11 lines (6 loc) · 472 Bytes

sizeofwithnumericparameter.md

File metadata and controls

11 lines (6 loc) · 472 Bytes

Pattern: Suspicious use sizeof with numeric constant

Issue: -

Description

Suspicious usage of sizeof with a numeric constant as parameter. It is unusual to use a constant value with sizeof. For example, sizeof(10) returns 4 (in 32-bit systems) or 8 (in 64-bit systems) instead of 10. sizeof(A) and sizeof(char) can return different results.

Further Reading