Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at ssl-proxy-openssl.c:613

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

client_start_tls

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/pop3-login/client.c)expand/collapse
Show more  
 60  static void client_start_tls(struct pop3_client *client)
 61  {
 62          int fd_ssl;
 63   
 64          client_ref(client);
 65          connection_queue_add(1);
 66[+]         if (!client_unref(client) || client->destroyed)
 67                  return;
 68   
 69          fd_ssl = ssl_proxy_new(client->common.fd, &client->common.ip,
 70[+]                                &client->common.proxy);
 71          if (fd_ssl == -1) {
 72                  client_send_line(client, "-ERR TLS initialization failed.");
 73                  client_destroy(client,
 74[+]                                "Disconnected: TLS initialization failed.");
expand/collapse

client_destroy

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/pop3-login/client.c)expand/collapse
Show more  
 346  void client_destroy(struct pop3_client *client, const char *reason)
 347  {
 348          if (client->destroyed)
 349                  return;
 350          client->destroyed = TRUE;
 351   
 352          if (!client-> && reason != NULL) {
 353                  reason = t_strconcat(reason, " ",
 354                          client_get_extra_disconnect_reason(&client->common),
 355                          NULL);
 356          }
 357          if (reason != NULL)
 358[+]                 client_syslog(&client->common, reason);
expand/collapse

client_syslog

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/client-common.c)expand/collapse
Show more  
 154  void client_syslog(struct client *client, const char *msg)
 155  {
 156          T_BEGIN {
 157[+]                 i_info("%s", client_get_log_str(client, msg));
expand/collapse

client_get_log_str

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/client-common.c)expand/collapse
Show more  
 112  static const char *
 113  client_get_log_str(struct client *client, const char *msg)
 114  {
 115          static struct var_expand_table static_tab[3] = {
 116                  { 's', NULL, NULL },
 117                  { '$', NULL, NULL },
 118                  { '\0', NULL, NULL }
 119          };
 120          const struct var_expand_table *var_expand_table;
 121          struct var_expand_table *tab;
 122          const char *p, *const *e;
 123          string_t *str;
 124   
 125[+]         var_expand_table = get_var_expand_table(client);
expand/collapse

get_var_expand_table

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/client-common.c)expand/collapse
Show more  
 36  static const struct var_expand_table *
 37  get_var_expand_table(struct client *client)
 38  {
 39          static struct var_expand_table static_tab[] = {
 40                  { 'u', NULL, "user" },
 41                  { 'n', NULL, "username" },
 42                  { 'd', NULL, "domain" },
 43                  { 's', NULL, "service" },
 44                  { 'h', NULL, "home" },
 45                  { 'l', NULL, "lip" },
 46                  { 'r', NULL, "rip" },
 47                  { 'p', NULL, "pid" },
 48                  { 'm', NULL, "mech" },
 49                  { 'a', NULL, "lport" },
 50                  { 'b', NULL, "rport" },
 51                  { 'c', NULL, "secured" },
 52                  { 'k', NULL, "ssl_security" },
 53                  { 'e', NULL, "mail_pid" },
 54                  { '\0', NULL, NULL }
 55          };
 56          struct var_expand_table *tab;
 57          unsigned int i;
 58   
 59          tab = t_malloc(sizeof(static_tab));
 60          memcpy(tab, static_tab, sizeof(static_tab));
 61   
 62          if (client->virtual_user != NULL) {
 63                  tab[0].value = client->virtual_user;
 64                  tab[1].value = t_strcut(client->virtual_user, '@');
 65                  tab[2].value = strchr(client->virtual_user, '@');
 66                  if (tab[2].value != NULL) tab[2].value++;
 67   
 68                  for (i = 0; i < 3; i++)
 69                          tab[i].value = str_sanitize(tab[i].value, 80);
 70          }
 71          tab[3].value = ;
 72          tab[4].value = getenv("HOME");
 73          tab[5].value = net_ip2addr(&client->local_ip);
 74          tab[6].value = net_ip2addr(&client->ip);
 75          tab[7].value = my_pid;
 76          tab[8].value = client->auth_mech_name == NULL ? NULL :
 77                  str_sanitize(client->auth_mech_name, MAX_MECH_NAME);
 78          tab[9].value = dec2str(client->local_port);
 79          tab[10].value = dec2str(client->remote_port);
 80          if (!client->tls) {
 81                  tab[11].value = client->secured ? "secured" : NULL;
 82                  tab[12].value = "";
 83          } else {
 84[+]                 const char *ssl_state = ssl_proxy_is_handshaked(client->proxy) ?
expand/collapse

ssl_proxy_is_handshaked

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/login-common/ssl-proxy-openssl.c)expand/collapse
Show more  
 611  bool ssl_proxy_is_handshaked(const struct ssl_proxy *proxy)
 612  {
 613          return proxy->handshaked;
Show more  
Show more  
Show more  
Show more  
Show more  
Show more  




Change Warning 7938.25772 : Null Pointer Dereference

Because they are very similar, this warning shares annotations with warning 7938.25938.

Priority:
State:
Finding:
Owner:
Note: