Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at mail-index-sync-ext.c:506

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

mail_index_sync_ext_intro

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-index-sync-ext.c)expand/collapse
Show more  
 461  int mail_index_sync_ext_intro(struct mail_index_sync_map_ctx *ctx,
 462                                const struct mail_transaction_ext_intro *u)
 463  {
 464          struct mail_index_map *map = ctx->view->map;
 465          struct mail_index_ext_header ext_hdr;
 466          const struct mail_index_ext *ext;
 467          const char *name, *error;
 468          uint32_t ext_map_idx;
 469          bool no_shrink;
 470   
 471          /* default to ignoring the following extension updates in case this
 472             intro is corrupted */
 473          ctx->cur_ext_map_idx = (uint32_t)-2;
 474          ctx->cur_ext_ignore = TRUE;
 475   
 476          if (u->ext_id != (uint32_t)-1 &&
 477              (!array_is_created(&map->extensions) ||
 478[+]              u->ext_id >= array_count(&map->extensions))) {
 479                  if (!mail_index_sync_ext_unknown_complain(ctx, u->ext_id))
 480                          return -1;
 481                  mail_index_sync_set_corrupted(ctx,
 482                          "Extension introduction for unknown id %u", u->ext_id);
 483                  return -1;
 484          }
 485   
 486          if (u->ext_id == (uint32_t)-1 && u->name_size == 0) {
 487                  mail_index_sync_set_corrupted(ctx,
 488                          "Extension introduction without id or name");
 489                  return -1;
 490          }
 491   
 492          if (u->ext_id != (uint32_t)-1) {
 493                  name = NULL;
 494                  ext_map_idx = u->ext_id;
 495          } else {
 496                  name = t_strndup(u + 1, u->name_size);
 497                  if (!mail_index_map_lookup_ext(map, name, &ext_map_idx))
 498                          ext_map_idx = (uint32_t)-1;
 499          }
 500          ext = ext_map_idx == (uint32_t)-1 ? NULL :
 501[+]                 array_idx(&map->extensions, ext_map_idx);
 502          if (ext != NULL)
 503                  name = ext->name;
 504   
 505          if (!ctx->internal_update &&
 506              strcmp(name, MAIL_INDEX_EXT_KEYWORDS) == 0) {
Show more  




Change Warning 7221.25530 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: