Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at str.c:91

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

maildir_get_uidvalidity_next

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/maildir/maildir-storage.c)expand/collapse
Show more  
 1086  uint32_t maildir_get_uidvalidity_next(struct mail_storage *storage)
 1087  {
 1088          const char *path;
 1089   
 1090          path = mailbox_list_get_path(storage->list, NULL,
 1091                                       MAILBOX_LIST_PATH_TYPE_CONTROL);
 1092[+]         path = t_strconcat(path, "/"MAILDIR_UIDVALIDITY_FNAME, NULL);
 1093[+]         return mailbox_uidvalidity_next(path);
expand/collapse

mailbox_uidvalidity_next

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/mailbox-uidvalidity.c)expand/collapse
Show more  
 158  uint32_t mailbox_uidvalidity_next(const char *path)
 159  {
 160          char buf[8+1], *endp;
 161          uint32_t cur_value;
 162          int fd, ret;
 163   
 164          fd = open(path, O_RDWR);
 165          if (fd == -1) {
 166                  if (errno != ENOENT)
 167                          i_error("open(%s) failed: %m", path);
 168                  return mailbox_uidvalidity_next_rescan(path);
 169          }
 170[+]         ret = read_full(fd, buf, sizeof(buf)-1);
 171          if (ret < 0) {
 172                  i_error("read(%s) failed: %m", path);
 173                  (void)close(fd);
 174                  return mailbox_uidvalidity_next_rescan(path);
 175          }
 176          buf[sizeof(buf)-1] = 0;
 177          cur_value = strtoul(buf, &endp, 16);
 178          if (ret == 0 || endp != buf+sizeof(buf)-1) {
 179                  /* broken value */
 180                  (void)close(fd);
 181                  return mailbox_uidvalidity_next_rescan(path);
 182          }
 183   
 184          /* we now have the current uidvalidity value that's hopefully correct */
 185[+]         if (mailbox_uidvalidity_rename(path, &cur_value) < 0)
expand/collapse

mailbox_uidvalidity_rename

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/mailbox-uidvalidity.c)expand/collapse
Show more  
 49  static int mailbox_uidvalidity_rename(const char *path, uint32_t *uid_validity)
 50  {
 51          string_t *src, *dest;
 52          unsigned int i, prefix_len;
 53          int ret;
 54   
 55          src = t_str_new(256);
 56[+]         str_append(src, path);
expand/collapse

str_append

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/str.c)expand/collapse
Show more  
 89  void str_append(string_t *str, const char *cstr)
 90  {
 91          buffer_append(str, cstr, strlen(cstr));
Show more  
Show more  
Show more  
Show more  




Change Warning 7316.24885 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: