Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at servers-setup.c:235

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2089.2090
Procedure: create_addr_conn
Trace: View
Modified: Wed Sep 2 11:51:08 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
   /u1/paul/SATE/2010/c/irssi/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
$param_1 = 0
$param_2 != 0
&$unknown_44594 = 0
((char*)setupservers->data)[4] != 0
Postconditions
_g_boolean_var_' = 1
address' = $param_2
((char*)&$unknown_44595)[8]' = ((char*)&$unknown_44595)[8] + 1
chat_type' = $param_1
chatnet' = $param_4
conn' = &$unknown_44595
nick' = $param_6
password' = $param_5
port' = $param_3
proto' = &$unknown_44594
sserver' = 0




Change Warning 2089.2090 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: