Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at raw-storage.c:228

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

raw_list_iter_is_mailbox

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/raw/raw-storage.c)expand/collapse
Show more  
 204  static int raw_list_iter_is_mailbox(struct mailbox_list_iterate_context *ctx,
 205                                      const char *dir, const char *fname,
 206                                      const char *mailbox_name ATTR_UNUSED,
 207                                      enum mailbox_list_file_type type,
 208                                      enum mailbox_info_flags *flags_r)
 209  {
 210          struct mail_storage *storage = RAW_LIST_CONTEXT(ctx->list);
 211          const char *path;
 212          struct stat st;
 213   
 214          /* try to avoid stat() with these checks */
 215          if (type == MAILBOX_LIST_FILE_TYPE_DIR) {
 216                  *flags_r = MAILBOX_NOSELECT | MAILBOX_CHILDREN;
 217                  return 1;
 218          }
 219          if (type != MAILBOX_LIST_FILE_TYPE_SYMLINK &&
 220              type != MAILBOX_LIST_FILE_TYPE_UNKNOWN &&
 221              (ctx->flags & MAILBOX_LIST_ITER_RETURN_NO_FLAGS) != 0) {
 222                  *flags_r = MAILBOX_NOINFERIORS;
 223                  return 1;
 224          }
 225   
 226          /* need to stat() then */
 227[+]         path = t_strconcat(dir, "/", fname, NULL);
 228          if (stat(path, &st) == 0) {
Show more  




Change Warning 7503.24868 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: