Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at imem.c:25

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

mail_transaction_log_find_file

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-transaction-log.c)expand/collapse
Show more  
 356  int mail_transaction_log_find_file(struct mail_transaction_log *log,
 357                                     uint32_t file_seq, bool nfs_flush,
 358                                     struct mail_transaction_log_file **file_r)
 359  {
 360          struct mail_transaction_log_file *file;
 361          const char *path;
 362          int ret;
 363   
 364          if (file_seq > log->head->hdr.file_seq) {
 365                  /* see if the .log file has been recreated */
 366                  if (log->head->locked) {
 367                          /* transaction log is locked. there's no way a newer
 368                             file exists. */
 369                          return 0;
 370                  }
 371   
 372                  if (mail_transaction_log_refresh(log, FALSE) < 0)
 373                          return -1;
 374                  if (file_seq > log->head->hdr.file_seq) {
 375                          if (!nfs_flush || !log->index->nfs_flush)
 376                                  return 0;
 377                          /* try again, this time flush attribute cache */
 378                          if (mail_transaction_log_refresh(log, TRUE) < 0)
 379                                  return -1;
 380                          if (file_seq > log->head->hdr.file_seq)
 381                                  return 0;
 382                  }
 383          }
 384   
 385          for (file = log->files; file != NULL; file = file->next) {
 386                  if (file->hdr.file_seq == file_seq) {
 387                          *file_r = file;
 388                          return 1;
 389                  }
 390          }
 391   
 392          if (MAIL_INDEX_IS_IN_MEMORY(log->index))
 393                  return 0;
 394   
 395          /* see if we have it in log.2 file */
 396          path = t_strconcat(log->index->filepath,
 397[+]                            MAIL_TRANSACTION_LOG_SUFFIX".2", NULL);
 398[+]         file = mail_transaction_log_file_alloc(log, path);
expand/collapse

mail_transaction_log_file_alloc

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-transaction-log-file.c)expand/collapse
Show more  
 48  struct mail_transaction_log_file *
 49  mail_transaction_log_file_alloc(struct mail_transaction_log *log,
 50                                  const char *path)
 51  {
 52          struct mail_transaction_log_file *file;
 53   
 54          file = i_new(struct mail_transaction_log_file, 1);
 55          file->log = log;
 56[+]         file->filepath = i_strdup(path);
expand/collapse

i_strdup

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/imem.c)expand/collapse
Show more  
 23  char *i_strdup(const char *str)
 24  {
 25      char *rv = strdup( str );
Show more  
Show more  
Show more  




Change Warning 11822.25683 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: