(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/auth/auth-request.c) |
| |
| 613 | | | void auth_request_set_credentials(struct auth_request *request, |
| 614 | | | const char *scheme, const char *data, |
| 615 | | | set_credentials_callback_t *callback) |
| 616 | | | { |
| 617 | | | struct passdb_module *passdb = request->passdb->passdb; |
| 618 | | | const char *cache_key, *new_credentials; |
| 619 | | | |
| 620 | | | cache_key = passdb_cache == NULL ? NULL : passdb->cache_key; |
| 621 | | | if (cache_key != NULL) |
| 622 | | | auth_cache_remove(passdb_cache, request, cache_key); |
| 623 | | | |
| 624 | | | request->private_callback.set_credentials = callback; |
| 625 | | | |
| 626 | | | new_credentials = t_strdup_printf("{%s}%s", scheme, data); |
Ignored Return Value
The return value of t_strdup_printf() 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_strdup_printf() 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_strdup_printf() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 627 | | | if (passdb->blocking) |
Event 2:
Taking false branch. passdb->blocking evaluates to false.
hide
|
|
| 628 | | | passdb_blocking_set_credentials(request, new_credentials); |
| 629 | | | else if (passdb->iface.set_credentials != NULL) { |
Event 3:
Taking false branch. passdb->iface.set_credentials != (void *)0 evaluates to false.
hide
|
|
| 630 | | | passdb->iface.set_credentials(request, new_credentials, |
| 631 | | | callback); |
| 632 | | | } else { |
| 633 | | | |
| 634 | | | callback(PASSDB_RESULT_INTERNAL_FAILURE, request); |
| 635 | | | } |
| 636 | | | } |
| |