(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-bodystructure.c) |
| |
| 234 | | | void imap_bodystructure_parse_header(pool_t pool, struct message_part *part, |
| 235 | | | struct *hdr) |
| 236 | | | { |
| 237 | | | struct message_part_body_data *part_data; |
| 238 | | | struct message_part_envelope_data *envelope; |
| 239 | | | bool parent_rfc822; |
| 240 | | | |
| 241 | | | if (hdr == NULL) { |
| 242 | | | if (part->context == NULL) { |
| 243 | | | |
| 244 | | | |
| 245 | | | part->context = part_data = |
| 246 | | | p_new(pool, struct message_part_body_data, 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) |
| |
|
| 247 | | | part_data->pool = pool; |
| 248 | | | } else if ((part->flags & MESSAGE_PART_FLAG_IS_MIME) == 0) { |
| 249 | | | |
| 250 | | | |
| 251 | | | part_data = part->context; |
| 252 | | | envelope = part_data->envelope; |
| 253 | | | |
| 254 | | | memset(part_data, 0, sizeof(*part_data)); |
| 255 | | | part_data->pool = pool; |
| 256 | | | part_data->envelope = envelope; |
Useless Assignment
This code assigns the variable the same value it already had. |
|
| 257 | | | } |
| 258 | | | return; |
| 259 | | | } |
| 260 | | | |
| 261 | | | if (hdr->eoh) |
| 262 | | | return; |
| 263 | | | |
| 264 | | | parent_rfc822 = part->parent != NULL && |
| 265 | | | (part->parent->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822) != 0; |
| 266 | | | if (!parent_rfc822 && strncasecmp(hdr->name, "Content-", 8) != 0) |
| 267 | | | return; |
| 268 | | | |
| 269 | | | if (part->context == NULL) { |
| 270 | | | |
| 271 | | | part->context = part_data = |
| 272 | | | p_new(pool, struct message_part_body_data, 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) |
| |
|
| 273 | | | part_data->pool = pool; |
| 274 | | | } |
| 275 | | | part_data = part->context; |
| 276 | | | |
| 277 | | | if (strncasecmp(hdr->name, "Content-", 8) == 0) { |
| 278 | | | T_BEGIN {
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/data-stack.h |
| |
49 | #define T_BEGIN \ |
50 | STMT_START { unsigned int _data_stack_cur_id = t_push(); |
| |
|
| 279 | | | (part_data, hdr, pool); |
| 280 | | | } T_END; |
| 281 | | | } |
| 282 | | | |
| 283 | | | if (parent_rfc822) { |
| 284 | | | |
| 285 | | | (pool, &part_data->envelope, hdr); |
| 286 | | | } |
| 287 | | | } |
| |