Text   |  XML   |  ReML   |   Visible Warnings:

Useless Assignment  at imap-bodystructure.c:256

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

imap_bodystructure_parse_header

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-bodystructure.c)expand/collapse
Show more  
 234  void imap_bodystructure_parse_header(pool_t pool, struct message_part *part,
 235                                       struct message_header_line *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                          /* no Content-* headers. add an empty context
 244                             structure anyway. */
 245                          part->context = part_data =
 246                                  p_new(pool, struct message_part_body_data, 1);
 247                          part_data->pool = pool;
 248                  } else if ((part->flags & MESSAGE_PART_FLAG_IS_MIME) == 0) {
 249                          /* If there was no Mime-Version, forget all
 250                             the Content-stuff */
 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;
 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                  /* initialize message part data */
 271                  part->context = part_data =
 272                          p_new(pool, struct message_part_body_data, 1);
 273                  part_data->pool = pool;
 274          }
 275          part_data = part->context;
 276   
 277          if (strncasecmp(hdr->name, "Content-", 8) == 0) {
 278                  T_BEGIN {
 279                          parse_content_header(part_data, hdr, pool);
 280                  } T_END;
 281          }
 282   
 283          if (parent_rfc822) {
 284                  /* message/rfc822, we need the envelope */
 285                  imap_envelope_parse_header(pool, &part_data->envelope, hdr);
 286          }
 287  }
Show more  




Change Warning 7171.25475 : Useless Assignment

Priority:
State:
Finding:
Owner:
Note: