Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Pointer Dereference  at servers-setup.c:235

Categories: LANG.MEM.NPD CWE:476
Warning ID: 4772.28241
Procedure: create_addr_conn
Trace: view
Modified: Thu Nov 26 11:08:14 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
ProblemLineSource
   /kat0/fletcher/SATE/2010/irssi-0.8.14/src/core/servers-setup.c
   Enter create_addr_conn
 209 static SERVER_CONNECT_REC * 
 210 create_addr_conn(int chat_type, const char *address, int port,
 211                  const char *chatnet, const char *password,
 212                  const char *nick) 
 213 {
 214         CHAT_PROTOCOL_REC *proto;
 215         SERVER_CONNECT_REC *conn;
 216         SERVER_SETUP_REC *sserver;
 217         CHATNET_REC *chatnetrec;
 218  
 219         g_return_val_if_fail(address != NULL, NULL);
 220  
 221         sserver = server_setup_find(address, port, chatnet);
 222         if (sserver != NULL) {
 223                 if (chat_type < 0)
 224                         chat_type = sserver->chat_type;
 225                 else if (chat_type != sserver->chat_type)
 226                         sserver = NULL;
 227         }
 228  
true229         proto = chat_type >= 0 ? chat_protocol_find_id(chat_type) : 
 230                 chat_protocol_get_default();
 231  
 232         conn = proto->create_server_connect();
 233         server_connect_ref(conn);
 234  
proto <= 4095235         conn->chat_type = proto->id;     /* Null Pointer Dereference */
Preconditions
chat_type = 0
address != 0
((char*)setupservers->data)[4] != 0
Postconditions
_g_boolean_var_' = 1
((char*)&$unknown_28784)[8]' = ((char*)&$unknown_28784)[8] + 1
conn' = &$unknown_28784
proto' = 0
sserver' = 0




Change Warning 4772.28241 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: