Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at dict.c:74

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

expire_run

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/expire/expire-tool.c)expand/collapse
Show more  
 222  static void expire_run(bool testrun)
 223  {
 224          struct expire_context ctx;
 225          struct dict *dict = NULL;
 226          struct dict_transaction_context *trans;
 227          struct dict_iterate_context *iter;
 228          struct expire_env *env;
 229          time_t oldest, expire_time;
 230          unsigned int expunge_secs, altmove_secs;
 231          const char *auth_socket, *p, *key, *value;
 232          const char *userp, *mailbox, *expire, *expire_altmove, *base_dir;
 233          int ret;
 234   
 235          expire = t_strdup(getenv("EXPIRE"));
 236[+]         expire_altmove = t_strdup(getenv("EXPIRE_ALTMOVE"));
 237          if (expire == NULL && expire_altmove == NULL)
 238                  i_fatal("expire and expire_altmove settings not set");
 239          if (getenv("EXPIRE_DICT") == NULL)
 240                  i_fatal("expire_dict setting not set");
 241   
 242          /* remove these so that expire plugin won't get used */
 243          env_remove("EXPIRE");
 244          env_remove("EXPIRE_ALTMOVE");
 245   
 246          if (getenv("MAIL_PLUGINS") == NULL)
 247                  modules = NULL;
 248          else {
 249                  const char *plugin_dir = getenv("MAIL_PLUGIN_DIR");
 250                  const char *version;
 251   
 252                  if (plugin_dir == NULL)
 253                          plugin_dir = MODULEDIR"/lda";
 254   
 255                  version = getenv("VERSION_IGNORE") != NULL ?
 256                          NULL : PACKAGE_VERSION;
 257                  modules = module_dir_load(plugin_dir, getenv("MAIL_PLUGINS"),
 258                                            TRUE, version);
 259          }
 260   
 261          dict_drivers_register_builtin();
 262          mail_users_init(getenv("AUTH_SOCKET_PATH"), getenv("DEBUG") != NULL);
 263          mail_storage_init();
 264          mail_storage_register_all();
 265          mailbox_list_register_all();
 266   
 267          module_dir_init(modules);
 268   
 269          expire_get_global_mail_ids();
 270   
 271          base_dir = getenv("BASE_DIR");
 272          if (base_dir == NULL)
 273                  base_dir = PKG_RUNDIR;
 274          auth_socket = getenv("AUTH_SOCKET_PATH");
 275          if (auth_socket == NULL) {
 276                  auth_socket = t_strconcat(base_dir, "/",
 277                                            DEFAULT_AUTH_SOCKET_FNAME, NULL);
 278          }
 279   
 280          memset(&ctx, 0, sizeof(ctx));
 281          ctx.testrun = testrun;
 282          ctx.auth_conn = auth_master_init(auth_socket, getenv("DEBUG") != NULL);
 283          env = expire_env_init(expire, expire_altmove);
 284          dict = dict_init(getenv("EXPIRE_DICT"), DICT_DATA_TYPE_UINT32, "",
 285[+]                          base_dir);
expand/collapse

dict_init

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-dict/dict.c)expand/collapse
Show more  
 66  struct dict *dict_init(const char *uri, enum dict_data_type value_type,
 67                         const char *username, const char *base_dir)
 68  {
 69          struct dict *dict;
 70          const char *p, *name;
 71   
 72          i_assert(username != NULL);
 73   
 74          p = strchr(uri, ':');
Show more  
Show more  




Change Warning 8073.25495 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: