Text   |  XML   |  ReML   |   Visible Warnings:

Buffer Overrun  at client.c:187

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

login_accept

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/main.c)expand/collapse
Show more  
 83  static void (void *context)
 84  {
 85          int listen_fd = POINTER_CAST_TO(context, int);
 86          struct ip_addr remote_ip, local_ip;
 87          unsigned int remote_port, local_port;
 88          struct client *client;
 89          int fd;
 90   
 91[+]         fd = net_accept(listen_fd, &remote_ip, &remote_port);
 92          if (fd < 0) {
 93                  if (fd < -1)
 94                          i_error("accept() failed: %m");
 95                  return;
 96          }
 97          i_set_failure_ip(&remote_ip);
 98   
 99[+]         if (net_getsockname(fd, &local_ip, &local_port) < 0) {
 100                  memset(&local_ip, 0, sizeof(local_ip));
 101                  local_port = 0;
 102          }
 103   
 104[+]         client = client_create(fd, FALSE, &local_ip, &remote_ip);
expand/collapse

client_create

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/pop3/client.c)expand/collapse
Show more  
 155  struct client *client_create(int fd_in, int fd_out, struct mail_user *user)
 156  {
 157          struct mail_storage *storage;
 158          const char *inbox;
 159          struct client *client;
 160          enum mailbox_open_flags flags;
 161          const char *errmsg;
 162          enum mail_error error;
 163   
 164          /* always use nonblocking I/O */
 165          net_set_nonblock(fd_in, TRUE);
 166          net_set_nonblock(fd_out, TRUE);
 167   
 168          client = i_new(struct client, 1);
 169          client->fd_in = fd_in;
 170          client->fd_out = fd_out;
 171          client->input = i_stream_create_fd(fd_in, MAX_INBUF_SIZE, FALSE);
 172          client->output = o_stream_create_fd(fd_out, (size_t)-1, FALSE);
 173          o_stream_set_flush_callback(client->output, client_output, client);
 174   
 175          client->io = io_add(fd_in, IO_READ, client_input, client);
 176          client->last_input = ioloop_time;
 177          client->to_idle = timeout_add(CLIENT_IDLE_TIMEOUT_MSECS,
 178                                        client_idle_timeout, client);
 179          if (!lock_session) {
 180                  client->to_commit = timeout_add(CLIENT_COMMIT_TIMEOUT_MSECS,
 181                                                  client_commit_timeout, client);
 182          }
 183   
 184          client->user = user;
 185   
 186          inbox = "INBOX";
 187          client->inbox_ns = mail_namespace_find(user->namespaces, &inbox);
Show more  
Show more  




Change Warning 7933.25503 : Buffer Overrun

Priority:
State:
Finding:
Owner:
Note: