(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/index-sort-string.c) |
| |
| 782 | | | void index_sort_list_finish_string(struct mail_search_sort_program *program) |
| 783 | | | { |
| 784 | | | struct sort_string_context *ctx = program->context; |
Event 1:
ctx is set to program->context.
hide
|
|
| 785 | | | struct mail_sort_node *nodes; |
| 786 | | | unsigned int i, count; |
| 787 | | | uint32_t seq; |
| 788 | | | |
| 789 | | | nodes = array_get_modifiable(&ctx->nonzero_nodes, &count);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
174 | #define array_get_modifiable(array, count) \ |
175 | ARRAY_TYPE_CAST_MODIFIABLE(array) \ |
176 | array_get_modifiable_i(&(array)->arr, count) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
45 | # define ARRAY_TYPE_CAST_MODIFIABLE(array) \ |
46 | (typeof(*(array)->v_modifiable)) |
| |
|
| 790 | | | |
| 791 | | | static_zero_cmp_context = ctx; |
| 792 | [+] | | if (array_count(&ctx->zero_nodes) == 0) { |
 |
| 793 | | | |
| 794 | | | qsort(nodes, count, sizeof(struct mail_sort_node), |
| 795 | | | sort_node_cmp); |
| 796 | | | |
| 797 | | | if (!array_is_created(&program->seqs))
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
91 | #define array_is_created(array) \ |
92 | array_is_created_i(&(array)->arr) |
| |
|
| 798 | | | i_array_init(&program->seqs, count);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
37 | #define i_array_init(array, init_count) \ |
38 | p_array_init(array, default_pool, init_count) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
35 | #define p_array_init(array, pool, init_count) \ |
36 | array_create(array, pool, sizeof(**(array)->v), init_count) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
75 | #define array_create(array, pool, element_size, init_count) \ |
76 | array_create_i(&(array)->arr, pool, element_size, init_count) |
| |
|
| 799 | | | else |
| 800 | | | array_clear(&program->seqs); |
| 801 | | | for (i = 0; i < count; i++) { |
| 802 | | | seq = nodes[i].seq; |
| 803 | | | array_append(&program->seqs, &seq, 1);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
116 | #define array_append(array, data, count) \ |
117 | array_append_i(&(array)->arr + ARRAY_TYPE_CHECK(array, data), \ |
118 | data, count) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
47 | # define ARRAY_TYPE_CHECK(array, data) \ |
48 | COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE( \ |
49 | **(array)->v_modifiable, *data) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
158 | # define COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(_a, _b) \ |
159 | COMPILE_ERROR_IF_TRUE( \ |
160 | !__builtin_types_compatible_p(typeof(_a), typeof(_b))) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
156 | # define COMPILE_ERROR_IF_TRUE(condition) \ |
157 | (sizeof(char[1 - 2 * !!(condition)]) - 1) |
| |
|
| 804 | | | } |
| 805 | | | array_free(&ctx->nonzero_nodes); |
| 806 | | | } else { |
| 807 | | | if (ctx->seqs_nonsorted) { |
Event 3:
Skipping " if". ctx->seqs_nonsorted evaluates to false.
hide
|
|
| 808 | | | |
| 809 | | | index_sort_nodes_by_seq(ctx); |
| 810 | | | } |
| 811 | | | |
| 812 | | | |
| 813 | | | |
| 814 | | | |
| 815 | | | index_sort_generate_seqs(ctx); |
| 816 | | | |
| 817 | | | index_sort_add_missing(ctx); |
| 818 | | | |
| 819 | | | nodes = array_get_modifiable(&ctx->nonzero_nodes, &count);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
174 | #define array_get_modifiable(array, count) \ |
175 | ARRAY_TYPE_CAST_MODIFIABLE(array) \ |
176 | array_get_modifiable_i(&(array)->arr, count) |
| |
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
45 | # define ARRAY_TYPE_CAST_MODIFIABLE(array) \ |
46 | (typeof(*(array)->v_modifiable)) |
| |
|
| 820 | | | qsort(nodes, count, sizeof(struct mail_sort_node), |
| 821 | | | sort_node_cmp); |
| 822 | | | for (;;) { |
| 823 | | | |
| 824 | [+] | | index_sort_zeroes(ctx); |
Event 4:
ctx, which evaluates to program->context, is passed to index_sort_zeroes(). See related event 1.
hide
|
|
 |
| 825 | | | |
| 826 | | | if (ctx->reverse) { |
Event 13:
Skipping " if". ctx->reverse evaluates to false.
hide
|
|
| 827 | | | |
| 828 | | | |
| 829 | | | |
| 830 | | | |
| 831 | | | |
| 832 | | | |
| 833 | | | |
| 834 | | | array_reverse(&ctx->nonzero_nodes);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
234 | #define array_reverse(array) \ |
235 | array_reverse_i(&(array)->arr) |
| |
|
| 835 | | | array_reverse(&ctx->zero_nodes);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
234 | #define array_reverse(array) \ |
235 | array_reverse_i(&(array)->arr) |
| |
|
| 836 | | | } |
| 837 | | | |
| 838 | | | |
| 839 | [+] | | index_sort_merge(ctx); |
Event 14:
ctx, which evaluates to program->context, is passed to index_sort_merge(). See related event 1.
hide
|
|
 |
| |