(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/pop3/commands.c) |
| |
| 450 | | | static int cmd_rset(struct client *client, const char *args ATTR_UNUSED) |
| 451 | | | { |
| 452 | | | struct mail_search_context *search_ctx; |
| 453 | | | struct mail *mail; |
| 454 | | | struct mail_search_args *search_args; |
| 455 | | | |
| 456 | | | client->last_seen = 0; |
| 457 | | | |
| 458 | | | if (client->deleted) { |
| 459 | | | client->deleted = FALSE; |
| 460 | | | memset(client->deleted_bitmask, 0, MSGS_BITMASK_SIZE(client));
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/pop3/client.h |
| |
9 | #define MSGS_BITMASK_SIZE(client) \ |
10 | (((client)->messages_count + (CHAR_BIT-1)) / CHAR_BIT) |
| |
|
| 461 | | | client->deleted_count = 0; |
| 462 | | | client->deleted_size = 0; |
| 463 | | | } |
| 464 | | | if (client->seen_change_count > 0) { |
| 465 | | | memset(client->seen_bitmask, 0, MSGS_BITMASK_SIZE(client));
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/pop3/client.h |
| |
9 | #define MSGS_BITMASK_SIZE(client) \ |
10 | (((client)->messages_count + (CHAR_BIT-1)) / CHAR_BIT) |
| |
|
| 466 | | | client->seen_change_count = 0; |
| 467 | | | } |
| 468 | | | |
| 469 | | | if (enable_last_command) { |
| 470 | | | |
| 471 | | | search_args = pop3_search_build(client, 0); |
| 472 | | | search_ctx = mailbox_search_init(client->trans, |
| 473 | | | search_args, NULL); |
| 474 | | | mail_search_args_unref(&search_args); |
| 475 | | | |
| 476 | | | mail = mail_alloc(client->trans, 0, NULL); |
| 477 | | | while (mailbox_search_next(search_ctx, mail) > 0) |
| 478 | | | mail_update_flags(mail, MODIFY_REMOVE, MAIL_SEEN); |
| 479 | | | mail_free(&mail); |
| 480 | | | (void)mailbox_search_deinit(&search_ctx); |
| 481 | | | |
| 482 | | | mailbox_transaction_commit(&client->trans); |
Ignored Return Value
The return value of mailbox_transaction_commit() 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 mailbox_transaction_commit() is checked 97% 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 mailbox_transaction_commit() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 483 | | | client->trans = mailbox_transaction_begin(client->mailbox, 0); |
| 484 | | | } |
| 485 | | | |
| 486 | | | client_send_line(client, "+OK"); |
| 487 | | | return 1; |
| 488 | | | } |
| |