Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at imap-bodystructure.c:696

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

index_mail_get_special

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/index-mail.c)expand/collapse
Show more  
 943  int index_mail_get_special(struct mail *_mail,
 944                             enum mail_fetch_field field, const char **value_r)
 945  {
 946          struct index_mail *mail = (struct index_mail *)_mail;
 947          struct index_mail_data *data = &mail->data;
 948          struct mail_cache_field *cache_fields = mail->ibox->cache_fields;
 949          string_t *str;
 950          const void *ext_data;
 951   
 952          switch (field) {
 953          case MAIL_FETCH_IMAP_BODY: {
 954                  unsigned int body_cache_field =
 955                          cache_fields[MAIL_CACHE_IMAP_BODY].idx;
 956                  unsigned int bodystructure_cache_field =
 957                          cache_fields[MAIL_CACHE_IMAP_BODYSTRUCTURE].idx;
 958   
 959                  if (data->body != NULL) {
 960                          *value_r = data->body;
 961                          return 0;
 962                  }
 963   
 964                  /* 1) use plain-7bit-ascii flag if it exists
 965                     2) get BODY if it exists 
 966                     3) get it using BODYSTRUCTURE if it exists 
 967                     4) parse body structure, and save BODY/BODYSTRUCTURE
 968                        depending on what we want cached */
 969   
 970                  str = str_new(mail->data_pool, 128);
 971                  if ((mail->data.cache_flags &
 972                       MAIL_CACHE_FLAG_TEXT_PLAIN_7BIT_ASCII) != 0 &&
 973                      get_cached_parts(mail)) {
 974                          index_mail_get_plain_bodystructure(mail, str, FALSE);
 975                          data->body = str_c(str);
 976                  } else if (index_mail_cache_lookup_field(mail, str,
 977[+]                                                          body_cache_field) > 0)
 978                          data->body = str_c(str);
 979                  else if (index_mail_cache_lookup_field(mail, str,
 980[+]                                         bodystructure_cache_field) > 0) {
 981                          data->bodystructure =
 982[+]                                 p_strdup(mail->data_pool, str_c(str));
 983                          str_truncate(str, 0);
 984   
 985                          if (imap_body_parse_from_bodystructure(
 986[+]                                                 data->bodystructure, str))
expand/collapse

imap_body_parse_from_bodystructure

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-bodystructure.c)expand/collapse
Show more  
 688  bool imap_body_parse_from_bodystructure(const char *bodystructure,
 689                                          string_t *dest)
 690  {
 691          struct istream *input;
 692          struct imap_parser *parser;
 693          const struct imap_arg *args;
 694          int ret;
 695   
 696          input = i_stream_create_from_data(bodystructure, strlen(bodystructure));
Show more  
Show more  




Change Warning 7344.26061 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: