(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/imap-acl/imap-acl-plugin.c) |
| |
| 128 | | | imap_acl_write_right(string_t *dest, string_t *tmp, |
| 129 | | | const struct acl_rights *right, bool neg) |
| 130 | | | { |
| 131 | | | const char *const *rights = neg ? right->neg_rights : right->rights; |
| 132 | | | |
| 133 | | | str_truncate(tmp, 0); |
| 134 | | | if (neg) str_append_c(tmp,'-'); |
| 135 | | | if (right->global) |
| 136 | | | str_append(tmp, IMAP_ACL_GLOBAL_PREFIX); |
| 137 | | | switch (right->id_type) { |
| 138 | | | case ACL_ID_ANYONE: |
| 139 | | | str_append(tmp, IMAP_ACL_ANYONE); |
| 140 | | | break; |
| 141 | | | case ACL_ID_AUTHENTICATED: |
| 142 | | | str_append(tmp, IMAP_ACL_AUTHENTICATED); |
| 143 | | | break; |
| 144 | | | case ACL_ID_OWNER: |
| 145 | | | str_append(tmp, IMAP_ACL_OWNER); |
| 146 | | | break; |
| 147 | | | case ACL_ID_USER: |
| 148 | | | str_append(tmp, right->identifier); |
| 149 | | | break; |
| 150 | | | case ACL_ID_GROUP: |
| 151 | | | str_append(tmp, IMAP_ACL_GROUP_PREFIX); |
| 152 | | | str_append(tmp, right->identifier); |
| 153 | | | break; |
| 154 | | | case ACL_ID_GROUP_OVERRIDE: |
| 155 | | | str_append(tmp, IMAP_ACL_GROUP_OVERRIDE_PREFIX); |
| 156 | | | str_append(tmp, right->identifier); |
Unreachable Call
The highlighted code will not execute under any circumstances. |
|
| 157 | | | break; |
| 158 | | | case ACL_ID_TYPE_COUNT: |
| 159 | | | i_unreached();
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/macros.h |
| |
208 | #define i_unreached() \ |
209 | i_panic("file %s: line %d: unreached", __FILE__, __LINE__) |
| |
|
| 160 | | | } |
| 161 | | | |
| 162 | | | imap_quote_append(dest, str_data(tmp), str_len(tmp), FALSE); |
| 163 | | | str_append_c(dest, ' '); |
| 164 | | | imap_acl_write_rights_list(dest, rights); |
| 165 | | | } |
| |