(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mailbox-list-index-sync.c) |
| |
| 409 | | | int mailbox_list_index_sync_init(struct mailbox_list_index *index, |
| 410 | | | const char *path, |
| 411 | | | enum mailbox_list_sync_flags flags, |
| 412 | | | struct mailbox_list_index_sync_ctx **ctx_r) |
| 413 | | | { |
| 414 | | | struct mailbox_list_index_sync_ctx *ctx; |
| 415 | | | struct mailbox_list_index_view *view; |
| 416 | | | pool_t pool; |
| 417 | | | size_t len; |
| 418 | | | |
| 419 | [+] | | if (mailbox_list_index_view_init(index, NULL, &view) < 0) |
 |
| 420 | | | return -1; |
| 421 | | | |
| 422 | | | |
| 423 | | | len = strlen(path); |
| 424 | | | if (len > 0 && path[len-1] != index->separator) |
| 425 | [+] | | path = t_strdup_printf("%s%c", path, index->separator); |
 |
| 426 | | | |
| 427 | | | pool = pool_alloconly_create(MEMPOOL_GROWING"mailbox list index sync", |
| 428 | | | 1024*32); |
| 429 | | | |
| 430 | | | ctx = p_new(pool, struct mailbox_list_index_sync_ctx, 1);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/mempool.h |
| |
84 | #define p_new(pool, type, count) \ |
85 | ((type *) p_malloc(pool, sizeof(type) * (count))) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/mempool.h |
| |
87 | #define p_malloc(pool, size) (pool)->v->malloc(pool, size) |
| |
|
| 431 | | | ctx->pool = pool; |
| 432 | | | ctx->index = index; |
| 433 | | | ctx->view = view; |
| 434 | [+] | | ctx->sync_path = p_strdup(pool, path); |
Event 37:
path, which evaluates to the value assigned to ret at data-stack.c:335, is passed to p_strdup() as the second argument. See related event 36.
hide
|
|
 |
| |