(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-quote.c) |
| |
| 91 | | | const char *imap_quote(pool_t pool, const unsigned char *value, |
| 92 | | | size_t value_len) |
| 93 | | | { |
| 94 | | | string_t *str; |
| 95 | | | char *ret; |
| 96 | | | |
| 97 | | | if (value == NULL) |
| 98 | | | return "NIL"; |
| 99 | | | |
| 100 | | | if (!pool->datastack_pool) |
| 101 | | | t_push(); |
Ignored Return Value
The return value of t_push() is never checked in the highlighted execution scenario. - If the return value can indicate an error, the error will be ignored if the highlighted code executes.
- The return value of t_push() is checked 99% of the time in this project. CodeSonar is configured to enforce Ignored Return Value checks for any function whose return value is checked at least 96% of the time, unless the function is used fewer than 20 times. (To modify these thresholds, use configuration file parameters RETURN_CHECKER_SAMPLE_SIZE and RETURN_CHECKER_RATIO. To exempt t_push() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 102 | | | |
| 103 | | | str = t_str_new(value_len + MAX_INT_STRLEN + 5);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/strfuncs.h |
| |
4 | #define MAX_INT_STRLEN ((sizeof(uintmax_t) * CHAR_BIT + 2) / 3 + 1) |
| |
|
| 104 | | | imap_quote_append(str, value, value_len, TRUE); |
Event 2:
!0 evaluates to true.
hide
|
|
| 105 | | | ret = p_strndup(pool, str_data(str), str_len(str)); |
| 106 | | | |
| 107 | | | if (!pool->datastack_pool) |
Event 3:
Taking true branch. pool->datastack_pool evaluates to false.
hide
|
|
| 108 | | | t_pop(); |
| 109 | | | return ret; |
| 110 | | | } |
| |