Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at mail-index-strmap.c:849

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

mail_index_strmap_view_renumber

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-index-strmap.c)expand/collapse
Show more  
 814  static void mail_index_strmap_view_renumber(struct mail_index_strmap_view *view)
 815  {
 816          struct mail_index_strmap_read_context ctx;
 817          struct mail_index_strmap_rec *recs, *hash_rec;
 818          uint32_t prev_uid, str_idx, *recs_crc32, *renumber_map;
 819          unsigned int i, dest, count, count2;
 820          int ret;
 821   
 822          memset(&ctx, 0, sizeof(ctx));
 823          ctx.view = view;
 824   
 825          /* create a map of old -> new index and remove records of
 826             expunged messages */
 827[+]         renumber_map = i_new(uint32_t, view->next_str_idx);
 828          str_idx = 0; prev_uid = 0;
 829[+]         recs = array_get_modifiable(&view->recs, &count);
 830          recs_crc32 = array_get_modifiable(&view->recs_crc32, &count2);
 831          i_assert(count == count2);
 832   
 833          for (i = dest = 0; i < count; ) {
 834                  if (prev_uid != recs[i].uid) {
 835                          /* see if this record should be removed */
 836                          prev_uid = recs[i].uid;
 837                          ret = mail_index_strmap_uid_exists(&ctx, prev_uid);
 838                          i_assert(ret >= 0);
 839                          if (ret == 0) {
 840                                  /* message expunged */
 841                                  do {
 842                                          i++;
 843                                  } while (i < count && recs[i].uid == prev_uid);
 844                                  continue;
 845                          }
 846                  }
 847   
 848                  i_assert(recs[i].str_idx < view->next_str_idx);
 849                  if (renumber_map[recs[i].str_idx] == 0)
Show more  




Change Warning 11463.25819 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: