Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at imap-sync.c:672

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

cmd_sync_delayed

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/imap/imap-sync.c)expand/collapse
Show more  
 682  bool cmd_sync_delayed(struct client *client)
 683  {
 684          struct client_command_context *cmd, *first_expunge, *first_nonexpunge;
 685   
 686          if (client->output_lock != NULL) {
 687                  /* wait until we can send output to client */
 688                  return FALSE;
 689          }
 690   
 691[+]         if (!imap_sync_is_allowed(client)) {
 692                  /* wait until mailbox can be synced */
 693                  return cmd_sync_drop_fast(client);
 694          }
 695   
 696          /* separate syncs that can send expunges from those that can't */
 697          first_expunge = first_nonexpunge = NULL;
 698          for (cmd = client->command_queue; cmd != NULL; cmd = cmd->next) {
 699                  if (cmd->sync != NULL &&
 700                      cmd->sync->counter == client->sync_counter) {
 701                          if (cmd->sync->flags & MAILBOX_SYNC_FLAG_NO_EXPUNGES) {
 702                                  if (first_nonexpunge == NULL)
 703                                          first_nonexpunge = cmd;
 704                          } else {
 705                                  if (first_expunge == NULL)
 706                                          first_expunge = cmd;
 707                          }
 708                  }
 709          }
 710          if (first_expunge != NULL && first_nonexpunge != NULL) {
 711                  /* sync expunges after nonexpunges */
 712                  for (cmd = first_expunge; cmd != NULL; cmd = cmd->next) {
 713                          if (cmd->sync != NULL &&
 714                              cmd->sync->counter == client->sync_counter &&
 715                              (cmd->sync->flags &
 716                               MAILBOX_SYNC_FLAG_NO_EXPUNGES) == 0)
 717                                  cmd->sync->counter++;
 718                  }
 719                  first_expunge = NULL;
 720          }
 721          cmd = first_nonexpunge != NULL ? first_nonexpunge : first_expunge;
 722   
 723          if (cmd == NULL)
 724[+]                 return cmd_sync_drop_fast(client);
expand/collapse

cmd_sync_drop_fast

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/imap/imap-sync.c)expand/collapse
Show more  
 659  static bool cmd_sync_drop_fast(struct client *client)
 660  {
 661          struct client_command_context *cmd, *prev;
 662          bool ret = FALSE;
 663   
 664          if (client->command_queue == NULL)
 665                  return FALSE;
 666   
 667          for (cmd = client->command_queue; cmd->next != NULL; cmd = cmd->next) ;
 668          for (; cmd != NULL; cmd = prev) {
 669                  prev = cmd->next;
 670   
 671                  if (cmd->state == CLIENT_COMMAND_STATE_WAIT_SYNC &&
 672                      (cmd->sync->flags & MAILBOX_SYNC_FLAG_FAST) != 0) {
Show more  
Show more  




Change Warning 7967.25033 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: