Text   |  XML   |  ReML   |   Visible Warnings:

Buffer Overrun  at strfuncs.c:39

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

maildir_keywords_char_idx

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/maildir/maildir-keywords.c)expand/collapse
Show more  
 442  unsigned int maildir_keywords_char_idx(struct maildir_keywords_sync_ctx *ctx,
 443                                         char keyword)
 444  {
 445          const char *name;
 446          unsigned int chridx, idx;
 447   
 448          i_assert(keyword >= MAILDIR_KEYWORD_FIRST &&
 449                   keyword <= MAILDIR_KEYWORD_LAST);
 450          chridx = keyword - MAILDIR_KEYWORD_FIRST;
 451   
 452          if (ctx->chridx_to_idx[chridx] != 0)
 453                  return ctx->chridx_to_idx[chridx];
 454   
 455          /* lookup / create */
 456[+]         name = maildir_keywords_idx(ctx->mk, chridx);
 457          if (name == NULL) {
 458                  /* name is lost. just generate one ourself. */
 459[+]                 name = t_strdup_printf("unknown-%u", chridx);
 460[+]                 while (maildir_keywords_lookup(ctx->mk, name, &idx) > 0) {
 461                          /* don't create a duplicate name.
 462                             keep changing the name until it doesn't exist */
 463                          name = t_strconcat(name, "?", NULL);
 464                  }
 465[+]                 maildir_keywords_create(ctx->mk, name, chridx);
expand/collapse

maildir_keywords_create

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/maildir/maildir-keywords.c)expand/collapse
Show more  
 219  maildir_keywords_create(struct maildir_keywords *mk, const char *name,
 220                          unsigned int chridx)
 221  {
 222          const char **strp;
 223          char *new_name;
 224   
 225          i_assert(chridx < MAILDIR_MAX_KEYWORDS);
 226   
 227[+]         new_name = p_strdup(mk->pool, name);
expand/collapse

p_strdup

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/strfuncs.c)expand/collapse
Show more  
 31  char *p_strdup(pool_t pool, const char *str)
 32  {
 33          void *mem;
 34          size_t len;
 35   
 36          if (str == NULL)
 37                  return NULL;
 38   
 39          for (len = 0; (str)[len] != '\0'; )
 40                  len++;
Show more  
Show more  
Show more  




Change Warning 7317.24956 : Buffer Overrun

Priority:
State:
Finding:
Owner:
Note: