(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/mail-process.c) |
| |
| 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) |
Event 1:
Skipping " if". default_location == (void *)0 evaluates to false.
hide
|
|
| 256 | | | default_location = ""; |
| 257 | | | |
| 258 | | | for (i = 1; ns != NULL; i++, ns = ns->next) { |
Event 3:
Continuing from loop body. Entering loop body. ns != (void *)0 evaluates to true.
hide
|
|
| 259 | | | location = *ns->location != '\0' ? ns->location : |
Event 4:
*ns->location != 0 evaluates to true.
hide
|
|
| 260 | | | default_location; |
| 261 | | | location = expand_mail_env(location, table); |
| 262 | | | env_put(t_strdup_printf("NAMESPACE_%u=%s", i, location)); |
| 263 | | | |
| 264 | | | if (ns->separator != NULL) { |
Event 5:
Taking true branch. ns->separator != (void *)0 evaluates to true.
hide
|
|
| 265 | | | env_put(t_strdup_printf("NAMESPACE_%u_SEP=%s", |
| 266 | [+][+] | | i, ns->separator)); |
 |
 |
| 267 | | | } |
| 268 | | | if (ns->type != NULL) { |
| 269 | | | env_put(t_strdup_printf("NAMESPACE_%u_TYPE=%s", |
| 270 | | | i, ns->type)); |
| 271 | | | } |
| 272 | | | if (ns->alias_for != NULL) { |
| 273 | | | env_put(t_strdup_printf("NAMESPACE_%u_ALIAS=%s", |
| 274 | | | i, ns->alias_for)); |
| 275 | | | } |
| 276 | | | if (ns->prefix != NULL) { |
| 277 | | | |
| 278 | | | str = t_str_new(256); |
| 279 | | | str_printfa(str, "NAMESPACE_%u_PREFIX=", i); |
| 280 | | | var_expand(str, ns->prefix, table); |
| 281 | | | env_put(str_c(str)); |
| 282 | | | } |
| 283 | | | if (ns->inbox) |
| 284 | | | env_put(t_strdup_printf("NAMESPACE_%u_INBOX=1", i)); |
| 285 | | | if (ns->hidden) |
| 286 | | | env_put(t_strdup_printf("NAMESPACE_%u_HIDDEN=1", i)); |
| 287 | | | if (strcmp(ns->list, "no") != 0) { |
| 288 | | | env_put(t_strdup_printf("NAMESPACE_%u_LIST=%s", |
| 289 | | | i, ns->list)); |
| 290 | | | } |
| 291 | | | if (ns->subscriptions) |
| 292 | | | env_put(t_strdup_printf("NAMESPACE_%u_SUBSCRIPTIONS=1", |
| 293 | | | i)); |
| |