Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at master-settings.c:893

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

settings_fix

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/master-settings.c)expand/collapse
Show more  
 1022  static bool settings_fix(struct settings *set, bool nochecks, bool nofixes)
 1023  {
 1024          /* fix relative paths */
 1025[+]         fix_base_path(set, &set->);
 1026   
 1027          if (nochecks)
 1028                  return TRUE;
 1029[+]         if (!settings_verify(set))
expand/collapse

settings_verify

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/master-settings.c)expand/collapse
Show more  
 783  static bool settings_verify(struct settings *set)
 784  {
 785          const char *dir;
 786          int facility;
 787   
 788[+]         if (!(set))
 789                  return FALSE;
 790   
 791          set->mail_uid_t = (uid_t)-1;
 792          set->mail_gid_t = (gid_t)-1;
 793          set->mail_priv_gid_t = (gid_t)-1;
 794   
 795          if (*set->mail_uid != '\0') {
 796                  if (!parse_uid(set->mail_uid, &set->mail_uid_t)) {
 797                          i_error("Non-existing mail_uid: %s", set->mail_uid);
 798                          return FALSE;
 799                  }
 800          }
 801          if (*set->mail_gid != '\0') {
 802                  if (!parse_gid(set->mail_gid, &set->mail_gid_t)) {
 803                          i_error("Non-existing mail_gid: %s", set->mail_uid);
 804                          return FALSE;
 805                  }
 806          }
 807          if (*set->mail_privileged_group != '\0') {
 808                  if (!parse_gid(set->mail_privileged_group,
 809                                 &set->mail_priv_gid_t)) {
 810                          i_error("Non-existing mail_privileged_group: %s",
 811                                  set->mail_privileged_group);
 812                          return FALSE;
 813                  }
 814          }
 815   
 816          if (set->protocol != MAIL_PROTOCOL_ANY &&
 817              access(t_strcut(set->mail_executable, ' '), X_OK) < 0) {
 818                  i_error("mail_executable: Can't use %s: %m",
 819                          t_strcut(set->mail_executable, ' '));
 820                  return FALSE;
 821          }
 822   
 823          if (*set->log_path != '\0' && access(set->log_path, W_OK) < 0) {
 824                  dir = get_directory(set->log_path);
 825                  if (access(dir, W_OK) < 0) {
 826                          i_error("log_path: Can't write to directory %s: %m",
 827                                  dir);
 828                          return FALSE;
 829                  }
 830          }
 831   
 832          if (*set->info_log_path != '\0' &&
 833              access(set->info_log_path, W_OK) < 0) {
 834                  dir = get_directory(set->info_log_path);
 835                  if (access(dir, W_OK) < 0) {
 836                          i_error("info_log_path: Can't write to directory %s: %m",
 837                                  dir);
 838                          return FALSE;
 839                  }
 840          }
 841   
 842[+]         if (!syslog_facility_find(set->syslog_facility, &facility)) {
 843                  i_error("syslog_facility: Unknown value: %s",
 844                          set->syslog_facility);
 845                  return FALSE;
 846          }
 847   
 848          if (strcmp(set->ssl, "no") != 0 &&
 849              strcmp(set->ssl, "yes") != 0 &&
 850              strcmp(set->ssl, "required") != 0) {
 851                  i_error("ssl setting: Invalid value: %s", set->ssl);
 852                  return FALSE;
 853          }
 854  #ifdef HAVE_SSL 
 855          if (strcmp(set->ssl, "no") != 0) {
 856                  if (*set->ssl_ca_file != '\0' &&
 857                      access(set->ssl_ca_file, R_OK) < 0) {
 858                          i_fatal("ssl_ca_file: Can't use %s: %m",
 859                                  set->ssl_ca_file);
 860                  }
 861   
 862                  if (access(set->ssl_cert_file, R_OK) < 0) {
 863                          i_error("ssl_cert_file: Can't use %s: %m",
 864                                  set->ssl_cert_file);
 865                          return FALSE;
 866                  }
 867   
 868                  if (access(set->ssl_key_file, R_OK) < 0) {
 869                          i_error("ssl_key_file: Can't use %s: %m",
 870                                  set->ssl_key_file);
 871                          return FALSE;
 872                  }
 873          }
 874  #else
 875          if (strcmp(set->ssl, "no") != 0) {
 876                  i_error("SSL support not compiled in but ssl=%s", set->ssl);
 877                  return FALSE;
 878          }
 879  #endif
 880          if (strcmp(set->ssl, "no") == 0 && set->disable_plaintext_auth &&
 881              strncmp(set->listen, "127.", 4) != 0 &&
 882              strcmp(set->protocols, "none") != 0 &&
 883              !settings_have_nonplaintext_auths(set)) {
 884                  i_warning("There is no way to  to this server: "
 885                            "disable_plaintext_auth=yes, ssl=no, "
 886                            "no non-plaintext auth mechanisms.");
 887          }
 888   
 889          if (set->max_mail_processes < 1) {
 890                  i_error("max_mail_processes must be at least 1");
 891                  return FALSE;
 892          }
 893          if (strcmp(set->, set->base_dir) == 0) {
Show more  
Show more  




Change Warning 7834.25538 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: