Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at istream.c:35

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);
expand/collapse

index_mail_init_stream

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/index-mail.c)expand/collapse
Show more  
 810  int index_mail_init_stream(struct index_mail *mail,
 811                             struct message_size *hdr_size,
 812                             struct message_size *body_size,
 813                             struct istream **stream_r)
 814  {
 815          struct index_mail_data *data = &mail->data;
 816          struct istream *input;
 817          int ret;
 818   
 819          if (!data->initialized_wrapper_stream && mail->mail.stats_track) {
 820                  input = i_stream_create_mail_stats_counter(&mail->mail,
 821                                                             data->stream);
 822                  i_stream_unref(&data->stream);
 823                  data->stream = input;
 824                  data->initialized_wrapper_stream = TRUE;
 825          }
 826   
 827          i_stream_set_destroy_callback(data->stream,
 828[+]                                       index_mail_stream_destroy_callback, mail);
expand/collapse

i_stream_set_destroy_callback

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/istream.c)expand/collapse
Show more  
 32  void i_stream_set_destroy_callback(struct istream *stream,
 33                                     istream_callback_t *callback, void *context)
 34  {
 35          struct iostream_private *iostream = &stream->real_stream->iostream;
Show more  
Show more  
Show more  




Change Warning 8164.26063 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: