Module cwe_checker_lib::utils::arguments
source · Expand description
Handles argument detection by parsing format string arguments during a function call. (e.g. sprintf)
Functions
- Calculates the register and stack positions of format string parameters. The parameters are then returned as an argument vector for later tainting.
- Parses the input format string for the corresponding string function.
- Returns an argument vector of detected variable parameters.
- Parses the destiniation address of the format string. It checks whether the address points to another pointer in memory. If so, it will use the target address of that pointer read the format string from memory.
- Parses the format string parameters using a regex, determines their data types, and calculates their positions (register or memory).