Text   |  XML   |  ReML   |   Visible Warnings:

Buffer Overrun  at var-expand.c:320

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

env_put_namespace

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/mail-process.c)expand/collapse
Show more  
 248  env_put_namespace(struct namespace_settings *ns, const char *default_location,
 249                    const struct var_expand_table *table)
 250  {
 251          const char *location;
 252          unsigned int i;
 253          string_t *str;
 254   
 255          if (default_location == NULL)
 256                  default_location = "";
 257   
 258          for (i = 1; ns != NULL; i++, ns = ns->next) {
 259                  location = *ns->location != '\0' ? ns->location :
 260                          default_location;
 261[+]                 location = expand_mail_env(location, table);
expand/collapse

expand_mail_env

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/mail-process.c)expand/collapse
Show more  
 218  static const char *
 219  expand_mail_env(const char *env, const struct var_expand_table *table)
 220  {
 221          string_t *str;
 222          const char *p;
 223   
 224          str = t_str_new(256);
 225   
 226          /* it's either type:data or just data */
 227          p = strchr(env, ':');
 228          if (p != NULL) {
 229                  while (env != p) {
 230                          str_append_c(str, *env);
 231                          env++;
 232                  }
 233   
 234                  str_append_c(str, *env++);
 235          }
 236   
 237[+]         if (has_missing_used_home(env, table)) {
expand/collapse

has_missing_used_home

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/mail-process.c)expand/collapse
Show more  
 210  has_missing_used_home(const char *str, const struct var_expand_table *table)
 211  {
 212          i_assert(table[VAR_EXPAND_HOME_IDX].key == 'h');
 213   
 214          return table[VAR_EXPAND_HOME_IDX].value == NULL &&
 215[+]                 var_has_key(str, 'h', "home");
expand/collapse

var_has_key

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/var-expand.c)expand/collapse
Show more  
 307  bool var_has_key(const char *str, char key, const char *long_key)
 308  {
 309          const char *end;
 310          char c;
 311   
 312          for (; *str != '\0'; str++) {
 313                  if (*str == '%' && str[1] != '\0') {
 314                          str++;
 315[+]                         c = var_get_key(str);
 316                          if (c == key)
 317                                  return TRUE;
 318   
 319                          if (c == '{' && long_key != NULL &&
 320                              (str = strchr(str, '{')) != NULL &&
Show more  
Show more  
Show more  
Show more  




Change Warning 7733.24775 : Buffer Overrun

Priority:
State:
Finding:
Owner:
Note: