(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-mail/message-decoder.c) |
| |
| 249 | | | static bool message_decode_body(struct message_decoder_context *ctx, |
| 250 | | | struct message_block *input, |
| 251 | | | struct message_block *output) |
| 252 | | | { |
| 253 | | | unsigned char new_buf[MAX_ENCODING_BUF_SIZE+1]; |
| 254 | | | const unsigned char *data = NULL; |
| 255 | | | size_t pos, size = 0, skip = 0; |
| 256 | | | int ret; |
| 257 | | | |
| 258 | | | if (ctx->encoding_size != 0) { |
Event 1:
Skipping " if". ctx->encoding_size != 0 evaluates to false.
hide
|
|
| 259 | | | |
| 260 | | | memcpy(new_buf, ctx->encoding_buf, ctx->encoding_size); |
| 261 | | | skip = sizeof(new_buf) - ctx->encoding_size; |
| 262 | | | if (skip > input->size) |
| 263 | | | skip = input->size; |
| 264 | | | memcpy(new_buf + ctx->encoding_size, input->data, skip); |
| 265 | | | } |
| 266 | | | |
| 267 | | | switch (ctx->content_type) { |
Event 2:
ctx->content_type evaluates to implicit-default.
hide
|
|
| 268 | | | case CONTENT_TYPE_UNKNOWN: |
| 269 | | | |
| 270 | | | return FALSE; |
| 271 | | | |
| 272 | | | case CONTENT_TYPE_BINARY: |
| 273 | | | data = input->data; |
| 274 | | | size = pos = input->size; |
| 275 | | | break; |
| 276 | | | case CONTENT_TYPE_QP: |
| 277 | | | buffer_set_used_size(ctx->buf, 0); |
| 278 310 |  | | [ Lines 278 to 310 omitted. ] |
| 311 | | | if (ret == 0) { |
| 312 | | | |
| 313 | | | pos = input->size - skip; |
| 314 | | | } |
| 315 | | | pos += skip; |
| 316 | | | data = ctx->buf->data; |
| 317 | | | size = ctx->buf->used; |
| 318 | | | break; |
| 319 | | | } |
| 320 | | | |
| 321 | | | if (pos != input->size) { |
| |