Text   |  XML   |  ReML   |   Visible Warnings:

Negative file descriptor  at dbox-file.c:557

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

dbox_sync_index_maildir_file

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-sync-rebuild.c)expand/collapse
Show more  
 246  dbox_sync_index_maildir_file(struct dbox_sync_rebuild_context *ctx,
 247                               const char *fname)
 248  {
 249          struct dbox_file *file;
 250          uoff_t offset = 0;
 251          int ret;
 252   
 253          if (ctx->mbox->maildir_sync_keywords == NULL) {
 254                  ctx->maildir_uidlist =
 255                          maildir_uidlist_init_readonly(&ctx->mbox->ibox);
 256                  ctx->mk = maildir_keywords_init_readonly(&ctx->mbox->ibox.box);
 257                  ctx->mbox->maildir_sync_keywords =
 258                          maildir_keywords_sync_init(ctx->mk,
 259                                                     ctx->mbox->ibox.index);
 260   
 261                  if (maildir_uidlist_refresh(ctx->maildir_uidlist) < 0)
 262                          return -1;
 263          }
 264   
 265[+]         file = dbox_file_init_new_maildir(ctx->mbox, fname);
 266[+]         if ((ret = dbox_sync_index_file_next(ctx, file, &offset)) > 0) {
expand/collapse

dbox_sync_index_file_next

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-sync-rebuild.c)expand/collapse
Show more  
 141  static int dbox_sync_index_file_next(struct dbox_sync_rebuild_context *ctx,
 142                                       struct dbox_file *file, uoff_t *offset)
 143  {
 144          uint32_t seq, uid;
 145          uoff_t physical_size;
 146          const char *path, *value;
 147          bool expunged;
 148          int ret;
 149   
 150          path = dbox_file_get_path(file);
 151[+]         ret = dbox_file_seek_next(file, offset, &uid, &physical_size);
expand/collapse

dbox_file_seek_next

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-file.c)expand/collapse
Show more  
 677  int dbox_file_seek_next(struct dbox_file *file, uoff_t *offset,
 678                          uint32_t *uid_r, uoff_t *physical_size_r)
 679  {
 680          uint32_t uid;
 681          uoff_t size;
 682          bool first = *offset == 0;
 683          bool deleted;
 684          int ret;
 685   
 686          ret = dbox_file_get_mail_stream(file, *offset, &uid, &size, NULL,
 687[+]                                         &deleted);
expand/collapse

dbox_file_get_mail_stream

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-file.c)expand/collapse
Show more  
 613  int dbox_file_get_mail_stream(struct dbox_file *file, uoff_t offset,
 614                                uint32_t *uid_r, uoff_t *physical_size_r,
 615                                struct istream **stream_r, bool *expunged_r)
 616  {
 617          int ret;
 618   
 619          *expunged_r = FALSE;
 620   
 621          if (file->input == NULL) {
 622                  if ((ret = dbox_file_open(file, TRUE, expunged_r)) <= 0 ||
 623                      *expunged_r)
 624                          return ret;
 625          }
 626   
 627          if (offset == 0)
 628                  offset = file->file_header_size;
 629   
 630          if (offset != file->cur_offset || file->cur_uid == 0) {
 631                  file->cur_offset = offset;
 632                  i_stream_seek(file->input, offset);
 633                  ret = dbox_file_read_mail_header(file, &file->cur_uid,
 634[+]                                                  &file->cur_physical_size);
expand/collapse

dbox_file_read_mail_header

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-file.c)expand/collapse
Show more  
 574  static int dbox_file_read_mail_header(struct dbox_file *file, uint32_t *uid_r,
 575                                        uoff_t *physical_size_r)
 576  {
 577          struct dbox_message_header hdr;
 578          const unsigned char *data;
 579          size_t size;
 580          int ret;
 581   
 582          if (file->maildir_file)
 583[+]                 return dbox_file_get_maildir_data(file, uid_r, physical_size_r);
expand/collapse

dbox_file_get_maildir_data

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-file.c)expand/collapse
Show more  
 551  dbox_file_get_maildir_data(struct dbox_file *file, uint32_t *uid_r,
 552                             uoff_t *physical_size_r)
 553  {
 554          struct dbox_index_record *rec;
 555          struct stat st;
 556   
 557          if (fstat(file->fd, &st) < 0) {
Show more  
Show more  
Show more  
Show more  
Show more  
Show more  




Change Warning 11691.25717 : Negative file descriptor

Priority:
State:
Finding:
Owner:
Note: