Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at auth-server-connection.c:323

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

auth_client_input

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-auth/auth-server-connection.c)expand/collapse
Show more  
 155  static void auth_client_input(struct auth_server_connection *conn)
 156  {
 157          const char *line;
 158          int ret;
 159   
 160[+]         switch (i_stream_read(conn->input)) {
 161          case 0:
 162                  return;
 163          case -1:
 164                  /* disconnected */
 165                  auth_server_connection_destroy(&conn, TRUE);
 166                  return;
 167          case -2:
 168                  /* buffer full - can't happen unless auth is buggy */
 169                  i_error("BUG: Auth server sent us more than %d bytes of data",
 170                          AUTH_CLIENT_MAX_LINE_LENGTH);
 171                  auth_server_connection_destroy(&conn, FALSE);
 172                  return;
 173          }
 174   
 175          if (conn->version_received) {
 176                  line = i_stream_next_line(conn->input);
 177                  if (line == NULL)
 178                          return;
 179   
 180                  /* make sure the major version matches */
 181                  if (strncmp(line, "VERSION\t", 8) != 0 ||
 182                      atoi(t_strcut(line + 8, '\t')) !=
 183                      AUTH_CLIENT_PROTOCOL_MAJOR_VERSION) {
 184                          i_error("Authentication server not compatible with "
 185                                  "this client (mixed old and new binaries?)");
 186                          auth_server_connection_destroy(&conn, FALSE);
 187                          return;
 188                  }
 189                  conn->version_received = TRUE;
 190          }
 191   
 192          conn->refcount++;
 193          while ((line = i_stream_next_line(conn->input)) != NULL) {
 194                  T_BEGIN {
 195                          ret = auth_client_input_line(conn, line);
 196                  } T_END;
 197   
 198                  if (!ret) {
 199[+]                         auth_server_connection_destroy(&conn, FALSE);
 200                          break;
 201                  }
 202          }
 203[+]         auth_server_connection_unref(conn);
expand/collapse

auth_server_connection_unref

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-auth/auth-server-connection.c)expand/collapse
Show more  
 321  static void auth_server_connection_unref(struct auth_server_connection *conn)
 322  {
 323          if (--conn->refcount > 0)
Show more  
Show more  




Change Warning 7531.24950 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: