SecureCoding-5.25

Incorrectly setting and using errno

Required inputs: IR

Rule description is currently unavailable for legal reasons.

Possible Messages

Key

Text

Severity

Disabled

misplaced_errno_check

errno should only be tested after a call to an errno-setting function.

None

False

missing_errno_check

errno should be tested against zero after this call to an errno-setting function.

None

False

missing_error_handling

The program should not check the value of errno without first verifying that the function returned an error indicator.

None

False

uncleared_errno

errno should be set to zero before calling an errno-setting function.

None

False

Options

errno_clearers

errno_clearers : set[bauhaus.analysis.config.QualifiedName] = set()

The (unused!) set of functions that reset errno to 0.
 

errno_readers

errno_readers : set[bauhaus.analysis.config.QualifiedName] = set()

The set of functions that read from errno.
 

not_setting_errno

not_setting_errno : set[bauhaus.analysis.config.QualifiedName] = set()

The set of functions that definitely do not change the errno value.
 

skip_out_of_band

skip_out_of_band : bool = False

Skip calls where in case of error, the return value is not a valid value.
 

standard_posix

standard_posix : bool = False

If true, use POSIX.1 standard. Otherwise, use C standard.
 

with_following_errno_read

with_following_errno_read : bool = False

Whether to only report when calls followed by an errno check.