(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/acl/acl-backend-vfile.c) |
| |
| 868 | | | static bool modify_right_list(pool_t pool, |
| 869 | | | const char *const **rightsp, |
| 870 | | | const char *const *modify_rights, |
| 871 | | | enum acl_modify_mode modify_mode) |
| 872 | | | { |
| 873 | | | const char *const *old_rights = *rightsp; |
| 874 | | | const char *const *new_rights; |
| 875 | | | const char *null = NULL; |
| 876 | | | ARRAY_TYPE(const_string) rights; |
| 877 | | | unsigned int i, j; |
| 878 | | | |
| 879 | | | if (modify_rights == NULL && modify_mode != ACL_MODIFY_MODE_CLEAR) { |
Event 1:
Skipping " if". modify_rights == (void *)0 evaluates to false.
hide
|
|
| 880 | | | |
| 881 | | | return FALSE; |
| 882 | | | } |
| 883 | | | |
| 884 | | | switch (modify_mode) { |
Event 2:
modify_mode evaluates to implicit-default.
hide
|
|
| 885 | | | case ACL_MODIFY_MODE_REMOVE: |
| 886 | | | if (old_rights == NULL || *old_rights == NULL) { |
| 887 | | | |
| 888 | | | return FALSE; |
| 889 | | | } |
| 890 | | | t_array_init(&rights, 64);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/array.h |
| |
39 | #define t_array_init(array, init_count) \ |
40 | p_array_init(array, pool_datastack_create(), 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) |
| |
|
| 891 | | | for (i = 0; old_rights[i] != NULL; i++) { |
| 892 | | | for (j = 0; modify_rights[j] != NULL; j++) { |
| 893 | | | if (strcmp(old_rights[i], modify_rights[j]) == 0) |
| 894 | | | break; |
| 895 909 |  | | [ Lines 895 to 909 omitted. ] |
| 910 | | | acl_rights_merge(pool, &new_rights, modify_rights, TRUE); |
| 911 | | | break; |
| 912 | | | case ACL_MODIFY_MODE_CLEAR: |
| 913 | | | if (*rightsp == NULL) { |
| 914 | | | |
| 915 | | | return FALSE; |
| 916 | | | } |
| 917 | | | *rightsp = NULL; |
| 918 | | | return TRUE; |
| 919 | | | } |
| 920 | | | *rightsp = new_rights; |
Uninitialized Variable
new_rights was not initialized. The issue can occur if the highlighted code executes. Show: All events | Only primary events |
|
| |