Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Call  at zlib-plugin.c:131

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

zlib_maildir_get_stream

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/zlib/zlib-plugin.c)expand/collapse
Show more  
 102  static int zlib_maildir_get_stream(struct mail *_mail,
 103                                     struct message_size *hdr_size,
 104                                     struct message_size *body_size,
 105                                     struct istream **stream_r)
 106  {
 107          struct mail_private *mail = (struct mail_private *)_mail;
 108          struct index_mail *imail = (struct index_mail *)mail;
 109          union mail_module_context *zmail = ZLIB_MAIL_CONTEXT(mail);
 110          struct istream *input;
 111          struct zlib_handler *handler;
 112          int fd;
 113   
 114          if (imail->data.stream != NULL) {
 115                  return zmail->super.get_stream(_mail, hdr_size, body_size,
 116                                                 stream_r);
 117          }
 118   
 119          if (zmail->super.get_stream(_mail, NULL, NULL, &input) < 0)
 120                  return -1;
 121          i_assert(input == imail->data.stream);
 122   
 123          handler = zlib_get_zlib_handler(imail->data.stream);
 124          if (handler != NULL) {
 125                  if (handler->create_istream == NULL) {
 126                          mail_storage_set_critical(_mail->box->storage,
 127                                  "zlib plugin: Detected %s compression "
 128                                  "but support not compiled in", handler->ext);
 129                          fd = -1;
 130                  } else {
 131                          fd = dup(i_stream_get_fd(imail->data.stream));
 132                          if (fd == -1) {
 133                                  mail_storage_set_critical(_mail->box->storage,
 134                                          "zlib plugin: dup() failed: %m");
 135                          }
 136                  }
 137   
 138                  imail->data.destroying_stream = TRUE;
 139                  i_stream_unref(&imail->data.stream);
 140                  i_assert(!imail->data.destroying_stream);
 141   
 142                  if (fd == -1)
 143                          return -1;
 144                  imail->data.stream = handler->create_istream(fd);
 145          }
 146          return index_mail_init_stream(imail, hdr_size, body_size, stream_r);
 147  }
Show more  




Change Warning 8163.26062 : Unreachable Call

Priority:
State:
Finding:
Owner:
Note: