Skip to content

Files

Latest commit

 

History

History
11 lines (6 loc) · 455 Bytes

autoVariables.md

File metadata and controls

11 lines (6 loc) · 455 Bytes

Pattern: Local auto-variable assigned to function parameter

Issue: -

Description

Dangerous assignment - the function parameter is assigned the address of a local auto-variable. Local auto-variables are reserved from the stack which is freed when the function ends. So the pointer to a local variable is invalid after the function ends.

Further Reading