(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/fts-squat/fts-backend-squat.c) |
| |
| 174 | | | fts_backend_squat_build_deinit(struct fts_backend_build_context *_ctx) |
| 175 | | | { |
| 176 | | | struct squat_fts_backend_build_context *ctx = |
| 177 | | | (struct squat_fts_backend_build_context *)_ctx; |
| 178 | | | ARRAY_TYPE(seq_range) uids; |
| 179 | | | int ret; |
| 180 | | | |
| 181 | | | i_array_init(&uids, 1024);
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) |
| |
|
| 182 | [+] | | if (get_all_msg_uids(ctx->ctx.backend->box, &uids) < 0) |
 |
| 183 | | | ret = squat_trie_build_deinit(&ctx->build_ctx, NULL); |
| 184 | | | else { |
| 185 | | | seq_range_array_invert(&uids, 2, (uint32_t)-2); |
Cast Alters Value
-2 is cast from int to unsigned int. - Negative values cannot be stored as unsigned int. Casting them to unsigned int can cause data loss or sign change.
The issue can occur if the highlighted code executes. Show: All events | Only primary events |
|
| |