Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at index-mail.c:498

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

index_mail_parse_body_finish

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/index-mail.c)expand/collapse
Show more  
 732  static int index_mail_parse_body_finish(struct index_mail *mail,
 733                                          enum index_cache_field field)
 734  {
 735          if (message_parser_deinit(&mail->data.parser_ctx,
 736[+]                                   &mail->data.parts) < 0) {
 737                  mail_set_cache_corrupted(&mail->mail.mail,
 738                                           MAIL_FETCH_MESSAGE_PARTS);
 739                  mail->data.parsed_bodystructure = FALSE;
 740                  return -1;
 741          }
 742          if (mail->data.no_caching) {
 743                  /* if we're here because we aborted parsing, don't get any
 744                     further or we may crash while generating output from
 745                     incomplete data */
 746                  return 0;
 747          }
 748   
 749[+]         (void)get_cached_msgpart_sizes(mail);
 750   
 751[+]         index_mail_body_parsed_cache_flags(mail);
expand/collapse

index_mail_body_parsed_cache_flags

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/index-mail.c)expand/collapse
Show more  
 471  static void index_mail_body_parsed_cache_flags(struct index_mail *mail)
 472  {
 473          struct index_mail_data *data = &mail->data;
 474          unsigned int cache_flags_idx;
 475          uint32_t cache_flags = data->cache_flags;
 476          bool want_cached;
 477   
 478          cache_flags_idx = mail->ibox->cache_fields[MAIL_CACHE_FLAGS].idx;
 479          want_cached = mail_cache_field_want_add(mail->trans->cache_trans,
 480                                                  data->seq, cache_flags_idx);
 481   
 482          if (data->parsed_bodystructure &&
 483              imap_bodystructure_is_plain_7bit(data->parts) &&
 484              (want_cached || want_plain_bodystructure_cached(mail))) {
 485                  cache_flags |= MAIL_CACHE_FLAG_TEXT_PLAIN_7BIT_ASCII;
 486                  /* we need message_parts cached to be able to
 487                     actually use it in BODY/BODYSTRUCTURE reply */
 488                  want_cached = TRUE;
 489                  data->save_message_parts = TRUE;
 490          }
 491   
 492          /* cache flags should never get unset as long as the message doesn't
 493             change, but try to handle it anyway */
 494          cache_flags &= ~(MAIL_CACHE_FLAG_BINARY_HEADER |
 495                           MAIL_CACHE_FLAG_BINARY_BODY |
 496                           MAIL_CACHE_FLAG_HAS_NULS |
 497                           MAIL_CACHE_FLAG_HAS_NO_NULS);
 498          if ((data->parts->flags & MESSAGE_PART_FLAG_HAS_NULS) != 0) {
Show more  
Show more  




Change Warning 7336.26031 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: