CertC-ERR33¶
Detect and handle standard library errors
Required inputs: IR
The majority of the standard library functions, including I/O functions and memory allocation functions, return either a valid value or a value of the correct return type that indicates an error (for example, -1 or a null pointer). Assuming that all calls to such functions will succeed and failing to check the return value for an indication of an error is a dangerous practice that may lead to unexpected or undefined behavior when an error occurs. It is essential that programs detect and appropriately handle all errors in accordance with an error-handling policy.
The successful completion or failure of each of the standard library functions listed in the following table shall be determined either by comparing the function's return value with the value listed in the column labeled "Error Return" or by calling one of the library functions mentioned in the footnotes.
Standard Library Functions
| Function | Successful Return | Error Return |
|---|---|---|
aligned_alloc() |
Pointer to space | NULL |
asctime_s() |
0 |
Nonzero |
at_quick_exit() |
0 |
Nonzero |
atexit() |
0 |
Nonzero |
bsearch() |
Pointer to matching element | NULL |
bsearch_s() |
Pointer to matching element | NULL |
btowc() |
Converted wide character | WEOF |
c16rtomb() |
Number of bytes | (size_t)(-1) |
c32rtomb() |
Number of bytes | (size_t)(-1) |
calloc() |
Pointer to space | NULL |
clock() |
Processor time | (clock_t)(-1) |
cnd_broadcast() |
thrd_success |
thrd_error |
cnd_init() |
thrd_success |
thrd_nomem or
thrd_error
|
cnd_signal() |
thrd_success |
thrd_error |
cnd_timedwait() |
thrd_success |
thrd_timedout or
thrd_error
|
cnd_wait() |
thrd_success |
thrd_error |
ctime_s() |
0 |
Nonzero |
fclose() |
0 |
EOF (negative) |
fflush() |
0 |
EOF (negative) |
fgetc() |
Character read | EOF1 |
fgetpos() |
0 |
Nonzero,
errno > 0
|
fgets() |
Pointer to string | NULL |
fgetwc() |
Wide character read | WEOF1 |
fopen() |
Pointer to stream | NULL |
fopen_s() |
0 |
Nonzero |
fprintf() |
Number of characters (nonnegative) | Negative |
fprintf_s() |
Number of characters (nonnegative) | Negative |
fputc() |
Character written | EOF2 |
fputs() |
Nonnegative | EOF (negative) |
fputwc() |
Wide character written | WEOF |
fputws() |
Nonnegative | EOF (negative) |
fread() |
Elements read | Elements read |
freopen() |
Pointer to stream | NULL |
freopen_s() |
0 |
Nonzero |
fscanf() |
Number of conversions (nonnegative) | EOF (negative) |
fscanf_s() |
Number of conversions (nonnegative) | EOF (negative) |
fseek() |
0 |
Nonzero |
fsetpos() |
0 |
Nonzero,
errno > 0
|
ftell() |
File position | -1L,
errno > 0
|
fwprintf() |
Number of wide characters (nonnegative) | Negative |
fwprintf_s() |
Number of wide characters (nonnegative) | Negative |
fwrite() |
Elements written | Elements written |
fwscanf() |
Number of conversions (nonnegative) | EOF (negative) |
fwscanf_s() |
Number of conversions (nonnegative) | EOF (negative) |
getc() |
Character read | EOF1 |
getchar() |
Character read | EOF1 |
getenv() |
Pointer to string | NULL |
getenv_s() |
Pointer to string | NULL |
gets_s() |
Pointer to string | NULL |
getwc() |
Wide character read | WEOF |
getwchar() |
Wide character read | WEOF |
gmtime() |
Pointer to broken-down time | NULL |
gmtime_s() |
Pointer to broken-down time | NULL |
localtime() |
Pointer to broken-down time | NULL |
localtime_s() |
Pointer to broken-down time | NULL |
malloc() |
Pointer to space | NULL |
mblen(), s != NULL |
Number of bytes | -1 |
mbrlen(), s != NULL |
Number of bytes or status | (size_t)(-1) |
mbrtoc16() |
Number of bytes or status | (size_t)(-1),
errno == EILSEQ
|
mbrtoc32() |
Number of bytes or status | (size_t)(-1),
errno == EILSEQ
|
mbrtowc(), s != NULL |
Number of bytes or status | (size_t)(-1),
errno == EILSEQ
|
mbsrtowcs() |
Number of non-null elements | (size_t)(-1),
errno == EILSEQ
|
mbsrtowcs_s() |
0 |
Nonzero |
mbstowcs() |
Number of non-null elements | (size_t)(-1) |
mbstowcs_s() |
0 |
Nonzero |
mbtowc(), s != NULL |
Number of bytes | -1 |
memchr() |
Pointer to located character | NULL |
mktime() |
Calendar time | (time_t)(-1) |
mtx_init() |
thrd_success |
thrd_error |
mtx_lock() |
thrd_success |
thrd_error |
mtx_timedlock() |
thrd_success |
thrd_timedout or
thrd_error
|
mtx_trylock() |
thrd_success |
thrd_busy or
thrd_error
|
mtx_unlock() |
thrd_success |
thrd_error |
printf_s() |
Number of characters (nonnegative) | Negative |
putc() |
Character written | EOF2 |
putwc() |
Wide character written | WEOF |
raise() |
0 |
Nonzero |
realloc() |
Pointer to space | NULL |
remove() |
0 |
Nonzero |
rename() |
0 |
Nonzero |
setlocale() |
Pointer to string | NULL |
setvbuf() |
0 |
Nonzero |
scanf() |
Number of conversions (nonnegative) | EOF (negative) |
scanf_s() |
Number of conversions (nonnegative) | EOF (negative) |
signal() |
Pointer to previous function | SIG_ERR,
errno > 0
|
snprintf() |
Number of characters that would be written (nonnegative) | Negative |
snprintf_s() |
Number of characters that would be written (nonnegative) | Negative |
sprintf() |
Number of non-null characters written | Negative |
sprintf_s() |
Number of non-null characters written | Negative |
sscanf() |
Number of conversions (nonnegative) | EOF (negative) |
sscanf_s() |
Number of conversions (nonnegative) | EOF (negative) |
strchr() |
Pointer to located character | NULL |
strerror_s() |
0 |
Nonzero |
strftime() |
Number of non-null characters | 0 |
strpbrk() |
Pointer to located character | NULL |
strrchr() |
Pointer to located character | NULL |
strstr() |
Pointer to located string | NULL |
strtod() |
Converted value | 0,
errno == ERANGE
|
strtof() |
Converted value | 0,
errno == ERANGE
|
strtoimax() |
Converted value | INTMAX_MAX or
INTMAX_MIN,
errno == ERANGE
|
strtok() |
Pointer to first character of a token | NULL |
strtok_s() |
Pointer to first character of a token | NULL |
strtol() |
Converted value | LONG_MAX or
LONG_MIN,
errno == ERANGE
|
strtold() |
Converted value | 0, errno == ERANGE |
strtoll() |
Converted value | LLONG_MAX or
LLONG_MIN,
errno == ERANGE
|
strtoumax() |
Converted value | UINTMAX_MAX,
errno == ERANGE
|
strtoul() |
Converted value | ULONG_MAX,
errno == ERANGE
|
strtoull() |
Converted value | ULLONG_MAX,
errno == ERANGE
|
strxfrm() |
Length of transformed string | >= n |
swprintf() |
Number of non-null wide characters | Negative |
swprintf_s() |
Number of non-null wide characters | Negative |
swscanf() |
Number of conversions (nonnegative) | EOF (negative) |
swscanf_s() |
Number of conversions (nonnegative) | EOF (negative) |
thrd_create() |
thrd_success |
thrd_nomem or
thrd_error
|
thrd_detach() |
thrd_success |
thrd_error |
thrd_join() |
thrd_success |
thrd_error |
thrd_sleep() |
0 |
Negative |
time() |
Calendar time | (time_t)(-1) |
timespec_get() |
Base | 0 |
tmpfile() |
Pointer to stream | NULL |
tmpfile_s() |
0 |
Nonzero |
tmpnam() |
Non-null pointer | NULL |
tmpnam_s() |
0 |
Nonzero |
tss_create() |
thrd_success |
thrd_error |
tss_get() |
Value of thread-specific storage | 0 |
tss_set() |
thrd_success |
thrd_error |
ungetc() |
Character pushed back | EOF (see below) |
ungetwc() |
Character pushed back | WEOF |
vfprintf() |
Number of characters (nonnegative) | Negative |
vfprintf_s() |
Number of characters (nonnegative) | Negative |
vfscanf() |
Number of conversions (nonnegative) | EOF (negative) |
vfscanf_s() |
Number of conversions (nonnegative) | EOF (negative) |
vfwprintf() |
Number of wide characters (nonnegative) | Negative |
vfwprintf_s() |
Number of wide characters (nonnegative) | Negative |
vfwscanf() |
Number of conversions (nonnegative) | EOF (negative) |
vfwscanf_s() |
Number of conversions (nonnegative) | EOF (negative) |
vprintf_s() |
Number of characters (nonnegative) | Negative |
vscanf() |
Number of conversions (nonnegative) | EOF (negative) |
vscanf_s() |
Number of conversions (nonnegative) | EOF (negative) |
vsnprintf() |
Number of characters that would be written (nonnegative) | Negative |
vsnprintf_s() |
Number of characters that would be written (nonnegative) | Negative |
vsprintf() |
Number of non-null characters (nonnegative) | Negative |
vsprintf_s() |
Number of non-null characters (nonnegative) | Negative |
vsscanf() |
Number of conversions (nonnegative) | EOF (negative) |
vsscanf_s() |
Number of conversions (nonnegative) | EOF (negative) |
vswprintf() |
Number of non-null wide characters | Negative |
vswprintf_s() |
Number of non-null wide characters | Negative |
vswscanf() |
Number of conversions (nonnegative) | EOF (negative) |
vswscanf_s() |
Number of conversions (nonnegative) | EOF (negative) |
vwprintf_s() |
Number of wide characters (nonnegative) | Negative |
vwscanf() |
Number of conversions (nonnegative) | EOF (negative) |
vwscanf_s() |
Number of conversions (nonnegative) | EOF (negative) |
wcrtomb() |
Number of bytes stored | (size_t)(-1) |
wcschr() |
Pointer to located wide character | NULL |
wcsftime() |
Number of non-null wide characters | 0 |
wcspbrk() |
Pointer to located wide character | NULL |
wcsrchr() |
Pointer to located wide character | NULL |
wcsrtombs() |
Number of non-null bytes | (size_t)(-1),
errno == EILSEQ
|
wcsrtombs_s() |
0 |
Nonzero |
wcsstr() |
Pointer to located wide string | NULL |
wcstod() |
Converted value | 0,
errno == ERANGE
|
wcstof() |
Converted value | 0,
errno == ERANGE
|
wcstoimax() |
Converted value | INTMAX_MAX or
INTMAX_MIN,
errno == ERANGE
|
wcstok() |
Pointer to first wide character of a token | NULL |
wcstok_s() |
Pointer to first wide character of a token | NULL |
wcstol() |
Converted value | LONG_MAX or
LONG_MIN,
errno == ERANGE
|
wcstold() |
Converted value | 0,
errno == ERANGE
|
wcstoll() |
Converted value | LLONG_MAX or
LLONG_MIN,
errno == ERANGE
|
wcstombs() |
Number of non-null bytes | (size_t)(-1) |
wcstombs_s() |
0 |
Nonzero |
wcstoumax() |
Converted value | UINTMAX_MAX,
errno == ERANGE
|
wcstoul() |
Converted value | ULONG_MAX,
errno == ERANGE
|
wcstoull() |
Converted value | ULLONG_MAX,
errno == ERANGE
|
wcsxfrm() |
Length of transformed wide string | >= n |
wctob() |
Converted character | EOF |
wctomb(), s != NULL |
Number of bytes stored | -1 |
wctomb_s(), s != NULL |
Number of bytes stored | -1 |
wctrans() |
Valid argument to
towctrans
|
0 |
wctype() |
Valid argument to
iswctype
|
0 |
wmemchr() |
Pointer to located wide character | NULL |
wprintf_s() |
Number of wide characters (nonnegative) | Negative |
wscanf() |
Number of conversions (nonnegative) | EOF (negative) |
wscanf_s() |
Number of conversions (nonnegative) | EOF (negative) |
Note: According to FIO35-C . Use feof() and ferror() to detect end-of-file and file errors when sizeof(int) == sizeof(char), callers should verify end-of-file and file errors for the functions in this table as follows:
1 By calling
ferror() and
feof()2 By calling
ferror()
The
ungetc() function does not set the error indicator even when
it fails, so it is not possible to check for errors reliably unless it is known
that the argument is not equal to
EOF. The C Standard [
ISO/IEC
9899:2011] states that "one character of pushback is guaranteed," so this
should not be an issue if, at most, one character is ever pushed back before
reading again. (See
FIO13-C
.
Never push back anything other than one read character.)
Noncompliant Code Example (
setlocale())
In this noncompliant code example, the function
utf8_to_wcs() attempts to convert a sequence of UTF-8 characters
to wide characters. It first invokes
setlocale() to set the global locale to the implementation-defined
en_US.UTF-8 but does not check for failure. The
setlocale() function will fail by returning a null pointer, for
example, when the locale is not installed. The function may fail for other
reasons as well, such as the lack of resources. Depending on the sequence
of characters pointed to by
utf8, the subsequent call to
mbstowcs() may fail or result in the function storing an
unexpected sequence of wide characters in the supplied buffer
wcs.
#include <locale.h>
#include <stdlib.h>
int utf8_to_wcs(wchar_t *wcs, size_t n, const char *utf8,
size_t *size) {
if (NULL == size) {
return -1;
}
setlocale(LC_CTYPE, "en_US.UTF-8");
*size = mbstowcs(wcs, utf8, n);
return 0;
}
Compliant Solution (
setlocale())
This compliant solution checks the value returned by
setlocale() and avoids calling
mbstowcs() if the function fails. The function also takes care to
restore the locale to its initial setting before returning control to the
caller.
#include <locale.h>
#include <stdlib.h>
int utf8_to_wcs(wchar_t *wcs, size_t n, const char *utf8,
size_t *size) {
if (NULL == size) {
return -1;
}
const char *save = setlocale(LC_CTYPE, "en_US.UTF-8");
if (NULL == save) {
return -1;
}
*size = mbstowcs(wcs, utf8, n);
if (NULL == setlocale(LC_CTYPE, save)) {
return -1;
}
return 0;
}
Noncompliant Code Example (
calloc())
In this noncompliant code example,
temp_num,
tmp2, and
num_of_records are derived from a
tainted
source. Consequently, an attacker can easily cause
calloc() to fail by providing a large value for
num_of_records.
#include <stdlib.h>
#include <string.h>
enum { SIG_DESC_SIZE = 32 };
typedef struct {
char sig_desc[SIG_DESC_SIZE];
} signal_info;
void func(size_t num_of_records, size_t temp_num,
const char *tmp2, size_t tmp2_size_bytes) {
signal_info *start = (signal_info *)calloc(num_of_records,
sizeof(signal_info));
if (tmp2 == NULL) {
/* Handle error */
} else if (temp_num > num_of_records) {
/* Handle error */
} else if (tmp2_size_bytes < SIG_DESC_SIZE) {
/* Handle error */
}
signal_info *point = start + temp_num - 1;
memcpy(point->sig_desc, tmp2, SIG_DESC_SIZE);
point->sig_desc[SIG_DESC_SIZE - 1] = '\0';
/* ... */
free(start);
}
When
calloc() fails, it returns a null pointer that is assigned to
start. If
start is null, an attacker can provide a value for
temp_num that, when scaled by
sizeof(signal_info), references a writable address to which
control is eventually transferred. The contents of the string referenced by
tmp2 can then be used to overwrite the address, resulting in an
arbitrary code execution
vulnerability.
Compliant Solution (
calloc())
To correct this error, ensure the pointer returned by
calloc() is not null:
#include <stdlib.h>
#include <string.h>
enum { SIG_DESC_SIZE = 32 };
typedef struct {
char sig_desc[SIG_DESC_SIZE];
} signal_info;
void func(size_t num_of_records, size_t temp_num,
const char *tmp2, size_t tmp2_size_bytes) {
signal_info *start = (signal_info *)calloc(num_of_records,
sizeof(signal_info));
if (start == NULL) {
/* Handle allocation error */
} else if (tmp2 == NULL) {
/* Handle error */
} else if (temp_num > num_of_records) {
/* Handle error */
} else if (tmp2_size_bytes < SIG_DESC_SIZE) {
/* Handle error */
}
signal_info *point = start + temp_num - 1;
memcpy(point->sig_desc, tmp2, SIG_DESC_SIZE);
point->sig_desc[SIG_DESC_SIZE - 1] = '\0';
/* ... */
free(start);
}
Noncompliant Code Example (
realloc())
This noncompliant code example calls
realloc() to resize the memory referred to by
p. However, if
realloc() fails, it returns a null pointer and the connection
between the original block of memory and
p is lost, resulting in a memory leak.
#include <stdlib.h>
void *p;
void func(size_t new_size) {
if (new_size == 0) {
/* Handle error */
}
p = realloc(p, new_size);
if (p == NULL) {
/* Handle error */
}
}
This code example complies with MEM04-C . Do not perform zero-length allocations.
Compliant Solution (
realloc())
In this compliant solution, the result of
realloc() is assigned to the temporary pointer
q and validated before it is assigned to the
original pointer
p:
#include <stdlib.h>
void *p;
void func(size_t new_size) {
void *q;
if (new_size == 0) {
/* Handle error */
}
q = realloc(p, new_size);
if (q == NULL) {
/* Handle error */
} else {
p = q;
}
}
Noncompliant Code Example (
fseek())
In this noncompliant code example, the
fseek() function is used to set the file position to a
location
offset in the file referred to by
file prior to reading a sequence of bytes from the file.
However, if an I/O error occurs during the seek operation, the subsequent read
will fill the buffer with the wrong contents.
#include <stdio.h>
size_t read_at(FILE *file, long offset,
void *buf, size_t nbytes) {
fseek(file, offset, SEEK_SET);
return fread(buf, 1, nbytes, file);
}
Compliant Solution (
fseek())
According to the C Standard, the
fseek() function returns a nonzero value to indicate that an
error occurred. This compliant solution tests for this condition before reading
from a file to eliminate the chance of operating on the wrong portion of the
file if
fseek() fails:
#include <stdio.h>
size_t read_at(FILE *file, long offset,
void *buf, size_t nbytes) {
if (fseek(file, offset, SEEK_SET) != 0) {
/* Indicate error to caller */
return 0;
}
return fread(buf, 1, nbytes, file);
}
Noncompliant Code Example (
snprintf())
In this noncompliant code example,
snprintf() is assumed to succeed. However, if the call fails
(for example, because of insufficient memory, as described in GNU libc
bug
441945), the subsequent call to
log_message() has
undefined
behavior because the character buffer is uninitialized and need not be
null-terminated.
#include <stdio.h>
extern void log_message(const char *);
void f(int i, int width, int prec) {
char buf[40];
snprintf(buf, sizeof(buf), "i = %*.*i", width, prec, i);
log_message(buf);
/* ... */
}
Compliant Solution (
snprintf())
This compliant solution does not assume that
snprintf() will succeed regardless of its arguments. It tests the
return value of
snprintf() before subsequently using the formatted buffer. This
compliant solution also treats the case where the static buffer is not large
enough for
snprintf() to append the terminating null character as an
error.
#include <stdio.h>
#include <string.h>
extern void log_message(const char *);
void f(int i, int width, int prec) {
char buf[40];
int n;
n = snprintf(buf, sizeof(buf), "i = %*.*i", width, prec, i);
if (n < 0 || n >= sizeof(buf)) {
/* Handle snprintf() error */
strcpy(buf, "unknown error");
}
log_message(buf);
}
Compliant Solution (
snprintf(null
))
If unknown, the length of the formatted string can be discovered by invoking
snprintf() with a null buffer pointer to determine the size
required for the output, then dynamically allocating a buffer of sufficient
size, and finally calling
snprintf() again to format the output into the dynamically
allocated buffer. Even with this approach, the success of all calls still needs
to be tested, and any errors must be appropriately handled. A possible
optimization is to first attempt to format the string into a reasonably small
buffer allocated on the stack and, only when the buffer turns out to be too
small, dynamically allocate one of a sufficient size:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
extern void log_message(const char *);
void f(int i, int width, int prec) {
char buffer[20];
char *buf = buffer;
int n = sizeof(buffer);
const char fmt[] = "i = %*.*i";
n = snprintf(buf, n, fmt, width, prec, i);
if (n < 0) {
/* Handle snprintf() error */
strcpy(buffer, "unknown error");
goto write_log;
}
if (n < sizeof(buffer)) {
goto write_log;
}
buf = (char *)malloc(n + 1);
if (NULL == buf) {
/* Handle malloc() error */
strcpy(buffer, "unknown error");
goto write_log;
}
n = snprintf(buf, n, fmt, width, prec, i);
if (n < 0) {
/* Handle snprintf() error */
strcpy(buffer, "unknown error");
}
write_log:
log_message(buf);
if (buf != buffer) {
free(buf);
}
}
This solution uses the
goto statement, as suggested in
MEM12-C
.
Consider using a goto chain when leaving a function on error when using and
releasing resources.
Exceptions
ERR33-C-EX1: It is acceptable to ignore the return value of a function if:
- that function cannot fail.
- its return value is inconsequential; that is, it does not indicate an error.
- it is one of a handful of functions whose return values are not traditionally checked. These functions are listed in the following table:
Functions for which Return Values Need Not Be Checked
| Function | Successful Return | Error Return |
|---|---|---|
putchar() |
Character written | EOF |
putwchar() |
Wide character written | WEOF |
puts() |
Nonnegative | EOF (negative) |
printf(),
vprintf()
|
Number of characters (nonnegative) | Negative |
wprintf(),
vwprintf()
|
Number of wide characters (nonnegative) | Negative |
kill_dependency() |
The input parameter | NA |
memcpy(),
wmemcpy()
|
The destination input parameter | NA |
memmove(),
wmemmove()
|
The destination input parameter | NA |
strcpy(),
wcscpy()
|
The destination input parameter | NA |
strncpy(),
wcsncpy()
|
The destination input parameter | NA |
strcat(),
wcscat()
|
The destination input parameter | NA |
strncat(),
wcsncat()
|
The destination input parameter | NA |
memset(),
wmemset()
|
The destination input parameter | NA |
The function's results should be explicitly cast to
void to signify programmer intent:
int main() {
(void) printf("Hello, world\n"); // printf() return value safely ignored
}
Risk Assessment
Failing to detect error conditions can lead to unpredictable results, including abnormal program termination and denial-of-service attacks or, in some situations, could even allow an attacker to run arbitrary code.
| Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
| ERR33-C | High | Likely | Medium | P18 | L1 |
Related Guidelines
| Taxonomy | Taxonomy item | Relationship |
|---|---|---|
| CERT C Secure Coding Standard | ERR00-C. Adopt and implement a consistent and comprehensive error-handling policy | Prior to 2018-01-12: CERT: Unspecified Relationship |
| CERT C Secure Coding Standard | EXP34-C . Do not dereference null pointers | Prior to 2018-01-12: CERT: Unspecified Relationship |
| CERT C Secure Coding Standard | FIO13-C . Never push back anything other than one read character | Prior to 2018-01-12: CERT: Unspecified Relationship |
| CERT C Secure Coding Standard | MEM04-C . Do not perform zero-length allocations | Prior to 2018-01-12: CERT: Unspecified Relationship |
| CERT C Secure Coding Standard | MEM12-C . Consider using a goto chain when leaving a function on error when using and releasing resources | Prior to 2018-01-12: CERT: Unspecified Relationship |
| CERT C | ERR10-CPP. Check for error conditions | Prior to 2018-01-12: CERT: Unspecified Relationship |
| CERT C | FIO04-CPP. Detect and handle input and output errors | Prior to 2018-01-12: CERT: Unspecified Relationship |
| ISO/IEC TS 17961:2013 | Failing to detect and handle standard library errors [liberr] | Prior to 2018-01-12: CERT: Unspecified Relationship |
| CWE 2.11 | CWE-252, Unchecked Return Value | 2017-07-06: CERT: Partial overlap |
| CWE 2.11 | CWE-253, Incorrect Check of Function Return Value | 2017-07-06: CERT: Partial overlap |
| CWE 2.11 | CWE-391, Unchecked Error Condition | 2017-07-06: CERT: Rule subset of CWE |
Bibliography
| [ DHS 2006] | Handle All Errors Safely |
| [ Henricson 1997] | Recommendation 12.1, "Check for All Errors Reported from Functions" |
| [ ISO/IEC 9899:2011] | Subclause 7.21.7.10, "The
ungetc Function"
|
| [ VU#159523] |
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
discarded_return_with_entity |
Return value of function discarded. |
None |
False |
possible_leak |
Possible memory leak in function error case when overriding a pointer. |
None |
False |
unhandled_return_value |
Return value of function call not properly checked. |
None |
False |
Options¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
allow_assignment_to_globals¶
allow_assignment_to_globals : bool = False
allow_assignment_to_variables_with_pointers¶
allow_assignment_to_variables_with_pointers : bool = True
allowed_functions¶
allowed_functions : set[bauhaus.analysis.config.FunctionName] = {'memcpy', 'memmove', 'memset', 'strcat', 'strcpy', 'strncat', 'strncpy'}
check_operators¶
check_operators : bool = False
function_argument_lookup¶
function_argument_lookup
Function name to argument position mapping where argument and return value are forbidden to share the same variable.Type: dict[bauhaus.analysis.config.QualifiedName, int]
Default:
{ 'realloc': 0 }
functions¶
functions
Allows to declare function names for which a check must exist. The check is expressed as an IR pattern.Type: dict[bauhaus.analysis.config.QualifiedName, bauhaus.ir.common.algorithms.matchers.Matcher]
Default:
{ 'aligned_alloc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'asctime_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'at_quick_exit': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'atexit': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'bsearch': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'bsearch_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'btowc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a350>, 'c16rtomb': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b0a0>, 'c32rtomb': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b0a0>, 'calloc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'clock': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a710>, 'cnd_broadcast': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83ac50>, 'cnd_init': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b220>, 'cnd_signal': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83ac50>, 'cnd_timedwait': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b280>, 'cnd_wait': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83ac50>, 'ctime_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'fclose': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'fflush': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'fgetc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'fgetpos': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b100>, 'fgets': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'fgetwc': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83aad0>, 'fopen': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'fopen_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'fprintf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'fprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'fputc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'fputs': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'fputwc': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83aad0>, 'fputws': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'fread': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'freopen': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'freopen_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'fscanf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'fscanf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'fseek': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'fsetpos': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b100>, 'ftell': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b1c0>, 'fwprintf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'fwprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'fwrite': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'fwscanf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'fwscanf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'getc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'getchar': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'getenv': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'getenv_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'gets_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'getwc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a350>, 'getwchar': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a350>, 'gmtime': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'gmtime_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'localtime': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'localtime_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'malloc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'mblen': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a260>, 'mbrlen': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a530>, 'mbrtoc16': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b0a0>, 'mbrtoc32': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b0a0>, 'mbrtowc': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b0a0>, 'mbsrtowcs': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b0a0>, 'mbsrtowcs_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'mbstowcs': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a530>, 'mbstowcs_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'mbtowc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a260>, 'memchr': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'mktime': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a620>, 'mtx_init': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83ac50>, 'mtx_lock': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83ac50>, 'mtx_timedlock': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b2e0>, 'mtx_trylock': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b340>, 'mtx_unlock': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83ac50>, 'printf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'putc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'putwc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a350>, 'raise': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'realloc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'remove': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'rename': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'scanf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'scanf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'setlocale': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'setvbuf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'signal': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b160>, 'snprintf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'snprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'sprintf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'sprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'sscanf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'sscanf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'strchr': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'strerror_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'strftime': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a0b0>, 'strpbrk': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'strrchr': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'strstr': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'strtod': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'strtof': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'strtoimax': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'strtok': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'strtok_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'strtol': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'strtold': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'strtoll': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'strtoul': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'strtoull': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'strtoumax': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'strxfrm': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'swprintf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'swprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'swscanf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'swscanf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'thrd_create': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b3a0>, 'thrd_detach': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83ac50>, 'thrd_join': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83ac50>, 'thrd_sleep': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'time': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a620>, 'timespec_get': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a0b0>, 'tmpfile': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'tmpfile_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'tmpnam': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'tmpnam_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'tss_create': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83ac50>, 'tss_get': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a0b0>, 'tss_set': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83ac50>, 'ungetc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'ungetwc': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a350>, 'vfprintf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'vfprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'vfscanf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'vfscanf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'vfwprintf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'vfwprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'vfwscanf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'vfwscanf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'vprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'vscanf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'vscanf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'vsnprintf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'vsnprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'vsprintf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'vsprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'vsscanf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'vsscanf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'vswprintf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'vswprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'vswscanf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'vswscanf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'vwprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'vwscanf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'vwscanf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'wcrtomb': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b0a0>, 'wcschr': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'wcsftime': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a0b0>, 'wcspbrk': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'wcsrchr': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'wcsrtombs': <bauhaus.ir.common.algorithms.matchers.OrMatcher object at 0x7f6f1b83b0a0>, 'wcsrtombs_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a0b0>, 'wcsstr': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'wcstod': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'wcstof': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'wcstoimax': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'wcstok': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'wcstok_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'wcstol': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'wcstold': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'wcstoll': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'wcstombs': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a530>, 'wcstombs_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'wcstoul': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'wcstoull': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'wcstoumax': <bauhaus.ir.common.algorithms.matchers.BinaryMatcher object at 0x7f6f1b83ab90>, 'wcsxfrm': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'wctob': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'wctomb': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a260>, 'wctomb_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a260>, 'wctrans': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a0b0>, 'wctype': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a0b0>, 'wmemchr': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b56a800>, 'wprintf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b304ee0>, 'wscanf': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440>, 'wscanf_s': <bauhaus.rules.axivion.expressions.calls.unhandled_return_value.BinaryRelationAnyMatcher object at 0x7f6f1b83a440> }
known_check_functions¶
known_check_functions : set[bauhaus.analysis.config.FunctionName] = set()
report_references¶
report_references : bool = False