Text   |  XML   |  ReML   |   Visible Warnings:

Negative file descriptor  at dbox-index.c:377

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

dbox_index_append_commit

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-index.c)expand/collapse
Show more  
 947  int dbox_index_append_commit(struct dbox_index_append_context **_ctx)
 948  {
 949          struct dbox_index_append_context *ctx = *_ctx;
 950          struct dbox_file **files;
 951          unsigned int i, count;
 952          int ret = 0;
 953   
 954          *_ctx = NULL;
 955   
 956[+]         files = array_get_modifiable(&ctx->files, &count);
 957          for (i = 0; i < count; i++) {
 958                  if (files[i]->file_id < ctx->first_new_file_id) {
 959                          /* FIXME: update status */
 960[+]                         dbox_index_unlock_file(ctx->index, files[i]->file_id);
 961                  }
 962                  dbox_file_unref(&files[i]);
 963          }
 964   
 965          if (ctx->locked_header) {
 966                  if (dbox_index_write_header(ctx->index) < 0)
 967                          ret = -1;
 968[+]                 dbox_index_unlock_header(ctx->index);
expand/collapse

dbox_index_unlock_header

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-index.c)expand/collapse
Show more  
 517  static void dbox_index_unlock_header(struct dbox_index *index)
 518  {
 519          dbox_index_unlock_range(index, 0,
 520[+]                                 sizeof(struct dbox_index_file_header));
expand/collapse

dbox_index_unlock_range

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-index.c)expand/collapse
Show more  
 392  static void dbox_index_unlock_range(struct dbox_index *index,
 393                                      off_t start, off_t len)
 394  {
 395[+]         (void)dbox_index_lock_range(index, F_SETLK, F_UNLCK, start, len);
expand/collapse

dbox_index_lock_range

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-index.c)expand/collapse
Show more  
 367  dbox_index_lock_range(struct dbox_index *index, int cmd, int lock_type,
 368                        off_t start, off_t len)
 369  {
 370          struct flock fl;
 371          const char *errstr;
 372   
 373          fl.l_type = lock_type;
 374          fl.l_whence = SEEK_SET;
 375          fl.l_start = start;
 376          fl.l_len = len;
 377          if (fcntl(index->fd, cmd, &fl) < 0) {
Show more  
Show more  
Show more  
Show more  




Change Warning 7458.25537 : Negative file descriptor

Priority:
State:
Finding:
Owner:
Note: