Skip to content

Files

Latest commit

 

History

History
11 lines (6 loc) · 383 Bytes

pointerArithBool.md

File metadata and controls

11 lines (6 loc) · 383 Bytes

Pattern: Suspicious pointer bool conversion

Issue: -

Description

Converting pointer arithmetic result to bool. The boolean result is always true unless there is pointer arithmetic overflow, and overflow is undefined behaviour. Probably a dereference is forgotten.

Further Reading